You are configuring an Azure API Management (APIM) policy to authenticate requests to a secure backend service. The backend service requires Azure Active Directory (Azure AD) tokens for the resource `https://api.contoso.com`. You must use a user-assigned managed identity with the Client ID `` to authenticate the requests.
Which of the following XML configurations correctly implements this authentication?
- A<outbound>
<base />
<authentication-managed-identity resource="https://api.contoso.com" client-id="11111111-2222-3333-4444-555555555555" />
</outbound> - <inbound>
<base />
<authentication-managed-identity resource="https://api.contoso.com" client-id="11111111-2222-3333-4444-555555555555" />
</inbound>Cevap - C<inbound>
<base />
<authentication-managed-identity resource="https://api.contoso.com" />
</inbound> - D<inbound>
<base />
<authentication-managed-identity resource="https://api.contoso.com" client-id="{{kv-identity-client-id}}" />
</inbound>
Cevap
The policy configuration that places the authentication-managed-identity element inside the inbound section and includes the correct resource and client-id attributes is correct.
The correct configuration uses the authentication-managed-identity policy within the inbound section, specifying the target resource and the client-id of the user-assigned managed identity. This ensures API Management acquires the Azure AD token using the correct identity and attaches it to the inbound request before it is sent to the backend.
Adım Adım Çözüm
Anahtar Kavram
Azure API Management Managed Identity Authentication Policies
Tahmini Süre:1m 30s