nicolonsky/ModernWorkplaceConcierge

Login fails with guest accounts due to incorrect authority

pl4nty opened this issue · 0 comments

When logging in, guest Azure AD accounts are prompted for a password in the guest tenant (which does not exist) due to a quirk/bug in Microsoft's authentication flow.

Since consumer accounts can't use this project, the issue can be resolved by using the /organization authority when generating the signin URL. Unfortunately it seems to be stored in a private config variable, so I couldn't submit a pull request.

private static readonly string tokenEndpoint = ConfigurationManager.AppSettings["TokenEndpoint"];

To fix, change TokenEndpoint to https://login.microsoftonline.com/organization/v2.0