Authorization broken: .well-known/openid-configuration endpoint issuer does not match the issuer in the token

Olli-Pekka Heinisuo 45 Reputation points
2023-12-19T11:34:42.6266667+00:00

All of our Entra External ID tenants are currently broken.

You have introduced a change that breaks the "iss" field from access token (or the .well-known/openid-configuration is wrong...). We are validating this field in our backend, and the field value does not match the value you give in the .well-known/openid-configuration endpoint.

Examples:

.well-known/openid-configuration endpoint value for iss: "https://login.microsoftonline.com/{tenant_id}/v2.0"

iss in access token: 'https://{tenant_id}.ciamlogin.com/{tenant_id}/v2.0'

This issue started occurring today in over 10 different tenants we manage.

Any timetable for a fix? Our customers cannot use our application currently because authorization won't work properly due to the above issue.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,907 questions
0 comments No comments
{count} votes

Accepted answer
  1. Akshay-MSFT 17,871 Reputation points Microsoft Employee
    2023-12-20T07:32:13.04+00:00

    @Olli-Pekka Heinisuo

    Thank you for posting your query on Microsoft Q&A, from above description I could understand that you had "https://login.microsoftonline.com/{tenant_id}/v2.0 configured as well known open ID issuer however the actual access token is coming from https://{tenantname}.ciamlogin.com/{tenantid}/v2.0.ciam.

    Please do correct me if this is the case by responding in the comments.

    As per Token endpoints and issuers

    Microsoft Entra ID workforce tenants authenticate at login.microsoftonline.com with tokens issued by sts.windows.net. Workforce tenant tokens are generally interchangeable across tenants and multi-tenant applications so long as underlying trust relationships permit this interoperability. Microsoft Entra ID customer tenants use tenanted endpoints of the form {tenantname}.ciamlogin.com. Applications registered to customer tenants must be aware of this separation to receive and validate tokens correctly. Every Microsoft Entra ID tenant publishes a standards-compliant well-known metadata. This document contains information about the issuer name, the authentication and authorization endpoints, supported scopes and claims. For customer tenants, the document is publicly available at: https://{tenantname}.ciamlogin.com/{tenantid}/v2.0/.well-known/openid-configuration. This endpoint returns an issuer value https://{tenantname}.ciamlogin.com/{tenantid}/v2.0.ciam.

    So, the suggestion here would be to have your application configured for authority as:

        "Authority": "https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/",
    
    

    Thanks,

    Akshay Kaushik

    Please "Accept the answer (Yes)" and "share your feedback ". This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.