APIM dev portal test console OAuth: wrong aud claim

Dev 9 86 Reputation points
2024-04-17T16:17:19.0133333+00:00

We have just set up an OAuth server, for using the developer portal to test API calls to protected backends, as per recipe

https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-oauth2?WT.mc_id=Portal-Microsoft_Azure_ApiManagement#security-considerations

Our backend will use App roles, no user sign-in, so in the default scope field in the OAuth config, I put the application ID URI in the form api://<Backend Application (client) ID>

Upon calling the API from the test portal, we get a 401.71 error, and upon inspection the audience claim in the token is mostly zeros:

"aud": "00000002-0000-0000-c000-000000000000",

Does anyone have any clues to why this is happening?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,216 questions
{count} votes

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.