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.
This is how I am setting up the Auth in the connector
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