Azure / api-management-policy-snippets

Re-usable examples of Azure API Management policies
MIT License
326 stars 147 forks source link

Policy Fragment does not support Authentication policy #118

Closed Prafulkapse closed 7 months ago

Prafulkapse commented 7 months ago

Hello,

I am trying to use a policy fragment and has below line in it `

<authentication-managed-identity resource="https://storage.azure.com/" output-token-variable-name="storage-access-token" client-id="@(context.Variables["client-id"])" /> ` This does not work giving me error as authentication-managed-identity (0.009 ms) { "message": "Managed service identity is not enabled for this service and authentication-managed-identity policy cannot be used." }

If i write the policy as below `

` Does the client-id parameter does not support taking value from context.variables ?

tomkerkhove commented 7 months ago

It looks like your service does not have managed identity enabled

Prafulkapse commented 7 months ago

It is enabled. I am able to get the token from the second statement.

tomkerkhove commented 7 months ago

Please open a support ticket to get further support; we cannot resolve it like this.