I am trying to get a OAuth token (client_credentials flow) to be able to call my API. I cannot get the proper audience in the token.
In Azure AD, I created 2 App Registration. One to represent my API, the other one to represent my Client.
In my API App Registration, I exposes an API
As you can see in the screenshot I also added my Client App Registration as an "Authorized client applications".
In my Client App Registration, I created a secret to authenticate.
I also added my API App Registration in the "API Permissions" and also Granted Admin Consent.
My problem is when I am trying to get a token from Azure AD. I do the following in Postman :
But the token I get does not contain the audience I specified. It contains the default "Graph API" Audience.
I've been reading on OAuth for the past 2 days but I can't figure out what I am doing wrong.
Also, please note that I cannot use the v2.0 endpoint because in the end, I do all this to be able to authenticate to my API in Power Automate and I don't have the option to use the v2.0 endpoint (and the resource or scope parameters).
Here's the token decoded
Any help will be greatly appreciated.