'Microsoft Azure login with AWS cognito for multi-tenant and personal account

Is there anyway to integrate Azure (multi-tenant and personal account) Login in Amazon Cognito?

The application's manifest is

"signInAudience": "AzureADandPersonalMicrosoftAccount"

In Amazon Cognito console, I tried to add OIDC Provider, issuer is https://login.microsoftonline.com/{tenant_id}/v2.0. It works with my tenant users. But it doesn't work for other tenant users and personal accounts. I see it's because issuer endpoint has my tenant_id.

I tried to use https://login.microsoftonline.com/common/v2.0, the Azure AD login works for multi-tenant and personal accounts, but cognito doesn't get token.

OAuth - Error handling auth response. Error: Bad+id_token+issuer+https%3A%2F%2Flogin.microsoftonline.com%2F58a488e4-8111-40be-a23b-f9531d464895%2Fv2.0

Hope to hear from you soon.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source