0

Im using the webchat control of the botframework. I tried setting the username via the iframe using querystring.

https://webchat.botframework.com/embed/YOUR_BOT_ID?s=YOUR_BOT_SECRET&username=DESIRED_USERNAME&userid=DESIRED_USERID

unfortunately during the

(message.Type == ActivityTypes.ConversationUpdate)

 if (message.MembersAdded.Any(m => m.Id == message.Recipient.Id))
            {
                var connector = new ConnectorClient(new Uri(message.ServiceUrl));
                var response = message.CreateReply();
                string replyMessage = string.Empty;
                if (string.IsNullOrEmpty(message.From.Name))
                {
                    replyMessage += "Hello there!\n\n";
                }
                else
                {
                    replyMessage += "Hello "+ message.From.Name +"\n\n";
                }

My message.from.name is empty. Im confused, because when i send a message it appears that my username is already set. How come during the conversation update it is still blank?

enter image description here

anonymous1110
  • 885
  • 4
  • 14
  • 28

1 Answers1

1

This is not possible in the IFrame WebChat control. Additionally, the user name you are setting is just for the display name as pictured in your screenshot. This is not a feature and there are no plans to support it in the future. This is probably not the answer you were looking for, but at least you can stop searching for the answer and troubleshooting. Good luck!

D4RKCIDE
  • 3,439
  • 1
  • 18
  • 34
  • thanks! i was trying to basically get the username (windows authentication) of the person that was conversing with the bot, i basically want to avoid the hassle of asking who the person was. – anonymous1110 Sep 05 '17 at 09:26
  • Unfortunately, not without making the user log in or something along those lines. – D4RKCIDE Sep 05 '17 at 15:18
  • please help: https://stackoverflow.com/questions/48374471/how-to-retrieve-saved-conversation-data-in-azure-tablelogger – anonymous1110 Jan 22 '18 at 08:17