Search code examples
rubyazureoauth-2.0

Access with personal account to multi-tenant application AAD


I have multi-tenant application and I would like all users of all types could access my application.

I have read that AAD API version 2.0 have possibility to access all types of account, i.e. work, school, guest, personal (https://learn.microsoft.com/en-US/azure/active-directory/develop/azure-ad-endpoint-comparison). So I am making request on v2.0 endpoint with ruby lang. Here is my url: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=some_id&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauthorize&response_type=code&scope=openid+profile+email+offline_access

When I try to login with my personal creds it says 'This doesn't look like a work or school email. You can't sign in here with a personal account. Use your work or school account instead.'

I have no idea what I am doing wrong. Any help will be appreciated


Solution

  • Could you please have a check you enabled personal Microsoft accounts to login your multi-tenant app ?

    You can check the config here : Please take a look below

    enter image description here

    If you enabled multi-tenant users to login only , you should enable personal Microsoft accounts manually .For now, we should modify it in Azure AD App manifest,modify the value of signInAudience to AzureADandPersonalMicrosoftAccount will make this happen: See the screen shot below

    enter image description here

    This change will take few minutes to work.