AI-103 Practice Question 12: Keyless Auth for Agents
Microsoft Azure AI Apps and Agents Developer Associate (AI-103) · Test 2 · question 2 of 10
A Python web app running on Azure App Service currently calls chat completions with an API key read from Key Vault. The team is moving the app onto Foundry Agent Service, and their first attempt (reusing the same api-key header against the agent endpoint) fails to authenticate. Security has also asked that the new integration hold no secret of any kind.
What should the team do?
Show answer and explanation
Answer:
The feature support matrix in the Foundry authentication documentation is explicit: the Agents service does not support API keys at all, only Microsoft Entra ID. The same table lists managed identity as an Entra-only capability that "enables secret-less auth". A system-assigned managed identity on App Service plus a Foundry role assignment gives the app an identity with no credential to store, and DefaultAzureCredential from azure-identity acquires the bearer token (scope https://ai.azure.com/.default) automatically.
- A is wrong because rotating a key does not change the fact that the Agents service refuses key-based authentication, and it leaves a secret in the system. - B is wrong on the second requirement. An app registration with a client secret *is* Entra authentication and would work, but it reintroduces exactly the stored, expiring secret the security team asked the team to eliminate. - D is wrong because a custom subdomain is a prerequisite for *token*-based authentication, not a switch that grants the Agents service key support.
Reference: Authentication and authorization in Microsoft Foundry