Skip to content

Instantly share code, notes, and snippets.

@mattruma

mattruma/Policy1.xml Secret

Last active Oct 28, 2020
Embed
What would you like to do?
Adventures in Azure API Management: Pay Attention to Order in Policies
<policies>
<inbound>
<base />
<authentication-managed-identity resource="https://MY_WEB_APP.azurewebsites.net" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
<policies>
<inbound>
<base />
<authentication-managed-identity resource="https://MY_WEB_APP.azurewebsites.net" />
<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/common/v2.0/.well-known/openid-configuration" />
<required-claims>
<claim name="aud">
<value>API_APP_REGISTRATION_APP_CLIENT_ID</value>
</claim>
</required-claims>
</validate-jwt>
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
<policies>
<inbound>
<base />
<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/common/v2.0/.well-known/openid-configuration" />
<required-claims>
<claim name="aud">
<value>d5070be4-48dc-4618-beb4-853df62818dc</value>
</claim>
</required-claims>
</validate-jwt>
<authentication-managed-identity resource="https://MY_WEB_APP.azurewebsites.net" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.