An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Dear @sikumars-msft,
Thanks for your kind reply. I had kept struggling and found the way out to make it work. To my surprise, the API management API's with Azure Ad Oauth 2.0 Client Credentials flow worked only with version 1 of the AD not too. Below are the two URL's I used with all older values and scopes and it started working.
OAuth 2.0 token endpoint (v1)
https://login.microsoftonline.com/<my-tenant-id>/oauth2/token
OAuth 2.0 authorization endpoint (v1)
https://login.microsoftonline.com/<my-tenant-id>/oauth2/authorize
I saw videos where version two with the same was working for all but not for me. Can this be due to my Free Azure Account with Developer Access?
But for now, I have another issue poped Up here. I'm now unable to use the validate-jwt policy. This does not work and is always returning
401, Unauthorized. Access token is missing or invalid.
Here are both of my policies version one and two
Version 1
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized. Access token is missing or invalid.">
<openid-config url="https://login.microsoftonline.com/<TenantID>/.well-known/openid-configuration" />
<audiences>
<audience>{Backend-App-ID}</audience>
</audiences>
<required-claims>
<claim name="id" match="all">
<value>insert claim here</value>
</claim>
</required-claims>
</validate-jwt>
Version 2
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized. Access token is missing or invalid.">
<openid-config url="https://login.microsoftonline.com/<TenantID>/v2.0/.well-known/openid-configuration" />
<required-claims>
<claim name="aud">
<value>{Backend-App-ID}</value>
</claim>
</required-claims>
</validate-jwt>
Kindly guide me on this. How can I add policies or fix make version 2 useable? I read on Stackoverflow that Azure AD V2 is not compatible with API Management. But the answer was of 2019.
Thanks,