Refer to the exhibit. You deploy this ARM template to create an agent. The agent uses a user-assigned managed identity to call an external weather API. The deployment succeeds but the agent fails to authenticate to the weather API. What is the most likely reason?
The API must trust the identity's token.
Why this answer
The agent uses a user-assigned managed identity to authenticate to an external weather API. Managed identities provide tokens that are valid only within the Microsoft Entra ID (formerly Azure AD) tenant where the identity is registered. For the agent to successfully authenticate, the external weather API must be configured as an application in that same tenant and trust tokens issued by that tenant.
Option D correctly identifies that the most likely reason for authentication failure is that the external weather API is not configured to accept tokens from the managed identity's tenant, meaning the API does not trust the token issuer.
Exam trap
The exam often tests the misconception that managed identity tokens are universally accepted by any API, when in fact the target API must be registered in the same tenant or explicitly configured to trust tokens from the managed identity's tenant.
How to eliminate wrong answers
Option A is wrong because the resourceId for the managed identity is used to identify the identity resource itself, not to authenticate to an external API; if the resourceId were incorrect, the deployment would likely fail or the identity would not be assigned, but the question states the deployment succeeds. Option B is wrong because the model provider 'AzureAI' is a valid provider for certain Azure AI services (e.g., Azure AI Agent Service) and is not required to be 'AzureOpenAI' for this scenario; the issue is authentication to the weather API, not the model provider. Option C is wrong because the URL parameter missing the API version would cause a different error (e.g., bad request or 400 status) rather than an authentication failure; the agent failing to authenticate indicates a token trust issue, not a malformed request.