After adding a new claims to an app I am getting the following error AADSTS50146 running the app.

Pessotto Diego 0 Reputation points
2025-02-20T23:24:19.7033333+00:00

Hi,

I have been requested to add an optional claims (user.onpremisessamaccountname) to an application part of our Entra ID (Azure AD) tenant. Developer reported that the application is failing with error "AADSTS50146 This application is required to be configured with an application-specific signing key".

I found that for a single tenant application (this is our case) I can put "AcceptMappedClaims" to TRUE in the application manifest. With this parameter set I am getting this error "AADSTS501461: AcceptMappedClaims is only supported for a token audience matching the application GUID or an audience within the tenant's verified domains.".

Looking at the URI that the developer entered I have seen that domain he was using was not part of our verified domain. I add it and verified it but the error AADSTS501461 is still persisting.

Any idea where the problem is?

Thank you

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Navya 20,180 Reputation points Microsoft External Staff Moderator
    2025-02-21T02:15:20.5933333+00:00

    Hi @Pessotto Diego

    Thank you for reaching out on Microsoft Q&A.

    I understand that after adding the optional claim (user.onpremisessamaccountname) to your application, the authentication process is failing with the error AADSTS50146.

    This error occurs because the application is receiving a token with customized claims, but it has not been configured to accept these modifications. By default, Microsoft Entra ID ensures that tokens remain unchanged and securely signed. If claims are modified, the application must explicitly acknowledge them to prevent security risks.

    As outlined in documentation, there are two ways to resolve this issue:

    1. Configure a custom signing key (typically for multi-tenant applications).
    2. Update the application manifest to accept mapped claims (for single-tenant applications).

    Since your application is single tenant, setting "acceptMappedClaims": true in the manifest is the correct approach. However, I see that you are encountering same error:

    AADSTS501461: AcceptMappedClaims is only supported for a token audience matching the application GUID or an audience within the tenant's verified domains.

    Given that you have already added and verified the required domain, please double-check the following:

    • Ensure the domain is properly verified in the Custom domain names section of your Microsoft Entra ID tenant.
    • Confirm that the Application ID URI is correctly set to use a verified domain name of your Microsoft Entra tenant (e.g., https://yourdomain/my-api)

    Hope this helps. Do let us know if you any further queries.


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.