You are securing a backend API by routing requests through Azure API Management (APIM). The backend API is secured using Microsoft Entra ID and requires authentication. You need to configure APIM to authenticate to the backend API using the APIM instance's system-assigned managed identity.
Which policy configuration should you apply to meet this requirement?
- <inbound>
<base />
<authentication-managed-identity resource="api://mybackend" />
</inbound>Answer - B<inbound>
<base />
<authentication-managed-identity resource="api://mybackend" client-id="00000000-0000-0000-0000-000000000000" />
</inbound> - C<outbound>
<base />
<authentication-managed-identity resource="api://mybackend" />
</outbound> - D<inbound>
<base />
<set-header name="Authorization" exists-action="override">
<value>@("Bearer " + "{{keyvault-token}}")</value>
</set-header>
</inbound>
Answer
The configuration that applies the authentication-managed-identity policy with only the resource attribute in the inbound section.
The correct configuration uses the authentication-managed-identity policy with only the resource attribute specified, placed in the inbound section. This instructs the APIM gateway to use its system-assigned managed identity to fetch a token for the specified resource and attach it to the inbound request before it is forwarded to the backend service.
Step-by-Step Solution
Key Concept
Securing backend services from APIM using managed identity authentication
Estimated Time:1m 30s