Question

Difficulty: EasySecure API Management Endpoints

You are configuring Azure API Management (APIM) to authenticate to a secure backend API using a user-assigned managed identity. You have already created the identity and associated it with the APIM instance. You add the authentication-managed-identity policy to the inbound processing section of the API. Which attribute must you include in the policy to identify the user-assigned managed identity?

  1. A
    resource
  2. B
    secret-identifier
  3. client-id (or identity-id)Answer
  4. D
    tenant-id

Answer

The correct attribute is client-id (or identity-id).
To authenticate to a backend API using a user-assigned managed identity, the authentication-managed-identity policy must include either the client-id or identity-id attribute. If these attributes are omitted, Azure API Management defaults to using the system-assigned managed identity.

Step-by-Step Solution

1
Analyze the authentication requirement.
A user-assigned managed identity must be used instead of the default system-assigned identity.
This is necessary when sharing a single identity across multiple resources or managing its lifecycle independently.
2
Examine the policy attributes for authentication-managed-identity.
The authentication-managed-identity policy has attributes like resource, client-id, and identity-id.
By default, omitting the client-id or identity-id will cause APIM to attempt to use the system-assigned managed identity.
3
Select the correct attribute to specify the user-assigned managed identity.
Adding the client-id (or identity-id) attribute resolves to the correct user-assigned identity.
This tells the APIM gateway which specific user-assigned identity's token to acquire.

Key Concept

Configuring user-assigned managed identity authentication in Azure API Management policies
Estimated Time:1m 0s
Rate this question