Add custom claims to azure b2c client credentials flow

Claudio Resende 221 Reputation points
2022-01-21T08:14:01.357+00:00

I have configured b2c as an Authorization Server for client credentials flow, I would like to add a claim to the token, so I could send it to the backend service in APIM using policy.
But I could not find a way to add this extra claim to the token so I could use it on the APIM.
Note: it was possible using Authorization Code flow, but the claims are not being passed through the request when using client credentials.

Is there a way for achieving that?

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,631 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Shweta Mathur 27,131 Reputation points Microsoft Employee
    2022-01-24T12:12:06.303+00:00

    Hi @Claudio Resende

    Thanks for reaching out.

    Unfortunately, As of now neither Azure AD nor Azure B2C allow to add any additional claims using client credential flow.

    I would suggest you post this idea at the Azure Feedback Portal, which is monitored by the product team for feature enhancements.

    Thanks,
    Shweta

    -----------------------------------------------------------------

    Please remember to "Accept Answer" if information provided helped you.

    0 comments No comments