Receiving InvalidAuthenticationTokenAudience error for ListByService endpoint

Daniel Chicchon 1 Reputation point
2022-06-07T16:24:58.62+00:00

So far I have been able to successfully use the api tester to make the desired api call that I want to apimanagement ListByService. However, when using a client credentials token I receive an InvalidAuthenticationTokenAudience error:

209164-screen-shot-2022-06-07-at-102738-am.png

Below is the Postman token request that I am sending:

209185-screen-shot-2022-06-07-at-92000-am.png

Additionally I enabled the permissions in API permissions for user_impersonation. Am I making a request to the wrong token endpoint? I'm unsure what I'm doing wrong here.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,453 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 29,266 Reputation points
    2022-06-08T12:38:14.197+00:00

    @Daniel Chicchon Thanks for reaching out. From the error message it says that the access token has been obtained for wrong audience could you please replace the scope value as below
    scope=https://management.core.windows.net/.default and try generating the token again.

    Hope this helps!

    To benefit the community find the right answers, please do mark the post which was helpful by clicking on Accept Answer’ & ‘Up-Vote’.

    1 person found this answer helpful.
    0 comments No comments

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.