0
votes

I have an Outlook Web Add-In where I use Microsoft Graph to access user emails. When the user opens our Add-In for the first time using Outlook Desktop we would open IE popup and ask him to grant the access to the his emails. Which works great. The problem is if the user has multiple office 365 accounts the next time he opens the add-in for the other account we would open the popup again but login.microsoftonline.com would automatically authorized the app using the previous account. This leads to the add-in having wrong access token to the wrong user's account.

Is there any way we can specify which particular account we need when we open login.microsoftonline.com page in the popup?

1

1 Answers

0
votes

You can use the login_hint URL parameter to specify the account you want to use for the OAuth flow. Check out https://msdn.microsoft.com/nl-nl/library/azure/dn645542.aspx for more information.