Search code examples
azureazure-active-directoryopenidmicrosoft-identity-platform

Microsoft Identity Platform V2 not working with personal accounts


I have setup a new app-registration on Azure, to perform OpenId authentication of my application. I have allowed personal accounts to connect to my application:

app setup

I can log into my application using my Azure Work account.

However, when I use a live account, I get the following error (AADSTS50020):

error

Do I really need to add all users who want to authenticate to the tenant? What if I have a public application?


Solution

  • Do I really need to add all users who want to authenticate to the tenant? What if I have a public application?

    No, you have used Microsoft Identity Platform V2 and allowed personal accounts to connect. The personal account should be able to login in without being added as a guest.

    1.Make sure you are using 'common' as the value of TenantId.

    2.Make sure you are using v2.0 endpoint.

    https://login.microsoftonline.com/common/oauth2/v2.0/authorize
    

    Here is a sample for your reference.