Azure-docs: Addition to the "Checking the response" section

Created on 15 Jan 2020  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-docs

Alternatively, if the authorization server does not include the "active" field to indicate that the token is valid or not, determine what properties are set in a valid token using a tool like Postman. For example, if a valid token response contains a property called "expires_in", check if this property name exists or not in the authorization server response:

<when condition="@(((IResponse)context.Variables["tokenstate"]).Body.As<JObject>().Property("expires_in") == null)">


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 api-managemensvc cxp doc-enhancement triaged

All 5 comments

Hi @richardspitz Thanks for your feedback. We will review and update as appropriate.

@vladvino Any inputs in this ?

Adding more context to why I requested this edit. The authorization server I was working with was not returning a property named "active" and this resulted in repeated "500 Internal Server Error". It took me a while to figure out that it was not the authorization server that was returning this error, rather the APIM server was, because it failed to evaluate the policy. Switching to using a field that was being returned in a successful token validation call such as "expires_in" and checking if it was not null (null would indicate that the token was not valid) solved this for us.

@richardspitz It might be easier for you to propose an edit by submitting a PR. I am not quite sure what the problem is based on your description and what action you would like us to take.

@richardspitz You can contribute to the doc change by submitting a PR for the edit you are proposing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jebeld17 picture jebeld17  Â·  3Comments

paulmarshall picture paulmarshall  Â·  3Comments

ianpowell2017 picture ianpowell2017  Â·  3Comments

Ponant picture Ponant  Â·  3Comments

bityob picture bityob  Â·  3Comments