0

Is it possible that the Microsoft Bot Framework Node.js - SDK4 automatically identify a logged in user from a Microsoft account (like a user that is logged in Sharepoint) so that I can use Microsoft Graph services directly on the bot without needing to ask user login and password?

I'm asking that because I have a bot running on a sharepoint page, and in theory, the user already will be logged in on a microsoft account when he starts talking to the bot.

1 Answers1

-1

Check this code.

                { ResponseIds.Greeting, (context, data) => {
                var greetings = JsonConvert.DeserializeObject<Greetings> 
                (MainStrings.GREETING);

                Random r = new Random( );
                int index = r.Next( greetings.messages.Count );

                return greetings.messages[index].message.Replace(" 
                {username}",context.Activity.From.Name);

                 } 

Else I have seen an authentication dialog that probably does a similar operation

Sash Sheen
  • 105
  • 2
  • 14
  • Did you then find a solution? Sharepoint apparently only supports iFrame embeds but check this [link](https://github.com/Microsoft/BotFramework-WebChat/issues/228) and workaround [link](https://stackoverflow.com/questions/13432821/is-it-possible-to-add-request-headers-to-an-iframe-src-request) – Sash Sheen Feb 07 '19 at 07:57
  • [link](https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-bot-framework) - This one as well – Sash Sheen Feb 07 '19 at 08:40