cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StuBK
Frequent Visitor

Power Automate Custom Connector - Token Invalid Invalid Audience

Hi,

 

I have built a few custom connectors before but for some reason am having real issues getting a custom connector to authenticate against an api i have written. 

 

The API is written in .netcore 5, hosted as a WebApp in the same tenant i am trying to connect from. I've checked the authentication setup and the ClientId is pointing to the 37008370 clientid guid in the below image.

 

Security Setup.png

I've connected to this API using a blazor app so I think authentication is setup correctly.

 

When I try and setup the authentication for a custom connector though I get the following response

 

{
  "content-length": "0",
  "date": "Wed, 20 Oct 2021 10:11:51 GMT",
  "request-context": "appId=cid-v1:4e1e4b6a-ace8-48e9-8121-546d6e834953",
  "www-authenticate": "Bearer error=\"invalid_token\", error_description=\"The audience 'api://37008370-*********' is invalid\"",
  "x-ms-apihub-cached-response": "false",
  "x-powered-by": "ASP.NET"
}

 

I think I have setup everything correctly and cant see where I am going wrong.

Any help appreciated.

Thanks

Stuart

1 REPLY 1
murshed
Microsoft
Microsoft

Pleas confirm your auth mechanism is set up correctly by invoking the API from PostMan first. If that's working you can retry the custom connector.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,733)