Eng Soon Cheah
Eng Soon Cheah

Reputation: 257

Multi-tenant issue in Microsoft Graph

Currently, I developing Microsoft ChatBot that needs login via Microsoft Graph. After I log in the error display as below. enter image description here

Upvotes: 0

Views: 175

Answers (1)

Philippe Signoret
Philippe Signoret

Reputation: 14336

When you registered your app, you chose one of three supported account types:

  • Accounts in this organizational directory only (i.e. one Azure AD tenant only)
  • Accounts in any organizational directory (i.e. any Azure AD tenant)
  • Accounts in any organizational directory and personal Microsoft accounts (i.e. any Azure AD tenant and any personal Microsoft account)

If you chose the first option, your app is not considered "multi-tenant", and you cannot use the "common" endpoint, as the error message indicates. You have two options here:

  1. If your application is to be used by users from multiple organizations, change the intended audience to "Accounts in any organizational directory" (Azure portal > Azure Active Directory > App registrations > Authentication).
  2. If your application is only intended to be used by one organization, then update your code to use the tenant-specific endpoint (i.e. https://login.microsoftonline.com/{tenant-id}/..., instead of https://login.microsoftonline.com/common/...).

Upvotes: 3

Related Questions