Share via

ADB2C and APIM

Abhay Chandramouli 1,061 Reputation points
2023-08-28T11:13:53.5166667+00:00

Hi,

I am trying to validate ADB2C Token using validate-jwt in Azure API Management.

Code:

<validate-jwt token-value="@(context.Variables.GetValueOrDefault<string>("b2cTokenValue"))" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized" require-expiration-time="true" require-signed-tokens="true">
                    <openid-config url="@(context.Variables.GetValueOrDefault<string>("well-known-ep"))" />
                    <audiences>
                        <audience>{{audience-1}}</audience>
                        <audience>{{audience-2}}</audience>
                    </audiences>
                    <issuers>
                        <issuer>{{adb2c-issuer}}</issuer>
                    </issuers>
                </validate-jwt>


Result: 

Can you please help me ?

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

Your answer

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