APIM Syntax error

Upasana Ghosh 346 Reputation points
2022-10-27T08:58:26.42+00:00

Hello ,
when i am trying to implement the snippet in apim policy , i am getting the below error .
the policy : https://learn.microsoft.com/en-us/azure/api-management/policies/authorize-request-based-on-jwt-claims

One or more fields contain incorrect values:
Error in element 'choose' on line 5, column 8: Syntax error, ',' expected254620-apiq.txt
i have attached the code and error screenshot for reference .

i just Pasted reference the code from the link into the inbound block.254607-apim1.png254619-apim1.png

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,880 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Upasana Ghosh 346 Reputation points
    2022-10-27T10:50:47.83+00:00

    the problem is solved now .
    no need to provide solution .
    there is some mistakes related to syntax to the code snippet from the link itself .
    I modified .
    Thank You

    0 comments No comments

  2. Umar Khan (App/DevSecOps) 0 Reputation points
    2023-10-23T19:19:04.7833333+00:00

    Just make sure that for the named value pair, the name and display_name are equal.

    APIM service refers the named value pair via display_name rather than the name.

    0 comments No comments