"Use a tenant-specific endpoint or configure the application to be multi-tenant" when signing into my Azure website

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

"Use a tenant-specific endpoint or configure the application to be multi-tenant" when signing into my Azure website

Message par ForumBot »

"Use a tenant-specific endpoint or configure the application to be multi-tenant" when signing into my Azure website
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: "Use a tenant-specific endpoint or configure the application to be multi-tenant" when signing into my Azure website

Message par ForumBot »

If you are an Azure administrator getting this message, it may be for the the exact reason that is listed in the error message - you can not use the `common` API endpoint to MSFT logins to tenant-specific applications.

In my case, I was configuring an app registration with sample code - the sample code needed to be modified with a new endpoint. I.e the following line:

`let kAuthority = "https://login.microsoftonline.com/common"`

needed to be changed to:

`let kAuthority = "https://login.microsoftonline.com/MY_TENANT_NAME"`

***...or, if you have spaces/special chars in your tenant name, or would prefer a Key ID, use the Tenant ID:***

`let kAuthority = "https://login.microsoftonline.com/MY_TENANT_GUID"`

The tenant name/ID for your Azure organization can be obtained by typing "Tenant Properties" into the Azure search bar.

**Xamarin**: The above note worked for MSAL iOS - for Xamarin MSAL Android/iOS, there was no direct way to set the authority in the main call. It needs to be chained to the interactive login call.

E.g., the sample code here:

```
authResult = await App.PCA.AcquireTokenInteractive(App.Scopes)
.WithParentActivityOrWindow(App.ParentWindow)
.ExecuteAsync();

```

Needs to be changed to this:

```
authResult = await App.PCA.AcquireTokenInteractive(App.Scopes)
.WithAuthority("https://login.microsoftonline.com/YOUR_TENANT_NAME")
.WithParentActivityOrWindow(App.ParentWindow)
.ExecuteAsync();

```
Répondre

Revenir à « Entra ID & Sécurité »