cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Operation failed (401) - The access token has been obtained for wrong audience or resource '00000002-0000-0000-c000-000000000000'

I want to create a custom connector that talks to the Azure Blueprint API.

Did some testing with postman everything is OK. But creating and testing the custom connector, the test fails. Receiving Bearer Token - See output: 

{
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGci............................ZChGP_3hKbi5fBa6PnSDGg",
"Content-Type": "application/json"
}

 

{
"cache-control": "no-cache",
"content-length": "372",
"content-type": "application/json; charset=utf-8",
"date": "Mon, 23 Dec 2019 21:19:38 GMT",
"expires": "-1",
"pragma": "no-cache",
"strict-transport-security": "max-age=31536000; includeSubDomains",
"www-authenticate": "Bearer authorization_uri=\"https://login.windows.net/4cc5a291-xxxx-43bc-9b22-cb498a85322b\", error=\"invalid_token\", error_description=\"The access token is from wrong audience or resource.\"",
"x-content-type-options": "nosniff",
"x-ms-correlation-request-id": "3a4e7ee3-xxxx-4f7a-a8fa-aba7e31ab95f",
"x-ms-failure-cause": "gateway",
"x-ms-request-id": "3a4e7ee3-7ec2-4f7a-xxxx-aba7e31ab95f",
"x-ms-routing-request-id": "WESTEUROPE:20191223T211938Z:3a4e7ee3-7ec2-xxxx-a8fa-aba7e31ab95f"
}

 

Body output: 
{
"error": {
"code": "InvalidAuthenticationTokenAudience",
"message": "The access token has been obtained for wrong audience or resource '00000002-0000-0000-c000-000000000000'. It should exactly match with one of the allowed audiences 'https://management.core.windows.net/','https://management.core.windows.net','https://management.azur...'."
}
}

 

What could be the problem here? 
Thanks for the help.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Operation failed (401) - The access token has been obtained for wrong audience or resource '00000002-0000-0000-c000-000000000000'

3 REPLIES 3
ppp345678
Level: Powered On

Re: Operation failed (401) - The access token has been obtained for wrong audience or resource '00000002-0000-0000-c000-000000000000'

Highlighted

Re: Operation failed (401) - The access token has been obtained for wrong audience or resource '00000002-0000-0000-c000-000000000000'

Dear @ppp345678 I have already seen these messages on the internet but is not related to Power Automate Custom Connector.

Using management.azure.com as a resource, but seems that the connector is sending the request to the back-end APIM in Azure.

I'm still investigating.

 

Re: Operation failed (401) - The access token has been obtained for wrong audience or resource '00000002-0000-0000-c000-000000000000'

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,987)