2

My Android app is using MSAL with this guide azure

When I try to sign up I get this error

MsalException: Applicationis not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after '10/15/2018'. Use a tenant-specific endpoint or configure the application to be multi-tenant.

Now i don't want to configure the application to be multi-tenant. so that leaves me with the second option of

Use a tenant-specific endpoint

From what I've seen I need to add it to the msal.config file which now looks like this :

{
  "client_id" : "my cli id",
  "redirect_uri" : "my red uri",
  "broker_redirect_uri_registered": true,
  "account_mode": "MULTIPLE",
  "authorities" : [
    {
      "type": "AAD",
      "audience": {
        "type": "AzureADandPersonalMicrosoftAccount"
      }
    }
  ]
}

now this doesn't have an effect , I also understand I need to put somewhere the url of the endpoint with the tennant id and it takes /common as default ,

Any one have any ideas or example of how to do that ?

Thanks all

yanivtwin
  • 547
  • 5
  • 26
  • 1
    https://stackoverflow.com/questions/53526121/use-a-tenant-specific-endpoint-or-configure-the-application-to-be-multi-tenant.. did you check this? – stinepike Aug 16 '20 at 01:26

1 Answers1

1

In the "audience", change the "type" to "AzureADMyOrg" and add "tenant_id" after that like below.

{
  "client_id" : "my cli id",
  "redirect_uri" : "my red uri",
  "broker_redirect_uri_registered": true,
  "account_mode": "MULTIPLE",
  "authorities" : [
    {
      "type": "AAD",
      "audience": {
        "type": "AzureADMyOrg",
        "tenant_id": "org_tenant_id"
      }
    }
  ]
}
Prateek
  • 76
  • 2