Federated Authentication flow - AWS Cognito as IDP - Microsoft Entra MultiTenant app
Federated authentication flow fails to conclude with the following error message:
Landscape:
Authentication completed and user gets redirected to the registered return URI.
I have played a bit around and if I change the Issuer in Cognito to be specific for my tenant: https://login.microsoftonline.com/{{entra_tenant_uuid}}/v2.0
I would appreciate any help, suggestion where to look for errors.
Thanks in advance!
error_description=Bad+id_token+issuer+https://login.microsoftonline.com/{{tenant_uuid}}/v2.0&error=invalid_requestLandscape:
- Globally unique ASP.NET web application responsibe to conclude with the initial authentication (.NET 8.0 ASP.NET hosting an Angular client app + providing backend API for auth flows)
- AWS Cognito as Identity provider
- Azure Enterprise application (Multitenant) which is used for the authentication process
- The user clicks the "Sign in with Microsoft" button --> gets redirected to Cognito (https://{{myDomain}}.auth.{{aws-region}}.amazoncognito.com/oauth2/authorize) passing a clientId --> clientId resolved in Cognito, matched with a registered App within --> User gets redirected to the login URL defined for the app --> user concluded with the authentication --> user gets redirected to cognito --> user gets redirected to the redirect URI
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id={{client_uuid}}&redirect_uri=https://{{myDomain}}.auth.{{aws-region}}.amazoncognito.com/oauth2/idpresponse&scope=openid&response_type=code&state={{state_part_1}}.{{state_part2}}.{{state_part3}}Authentication completed and user gets redirected to the registered return URI.
I have played a bit around and if I change the Issuer in Cognito to be specific for my tenant: https://login.microsoftonline.com/{{entra_tenant_uuid}}/v2.0
- I can authenticate successfully.
Though, in case of external tenants, this will result in an error because the issuer is invalid.
I would appreciate any help, suggestion where to look for errors.
Thanks in advance!