AI-102 Implement an agentic solution Practice Question
You are designing an agentic solution using Azure AI Agent Service. The agent needs to perform actions on behalf of users, such as sending emails and updating databases. The solution must use managed identities for authentication to Azure resources. Which TWO configurations are required?
⚠ Common exam trap
Candidates often confuse managed identities with service principals or API keys, thinking they need to create a separate service principal or store connection strings, when in fact managed identities are automatically managed service principals that require only RBAC role assignments and the use of DefaultAzureCredential (or ManagedIdentityCredential) in code.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use DefaultAzureCredential in the agent's code to authenticate to Azure services
DefaultAzureCredential is the recommended authentication mechanism for Azure SDKs when using managed identities. It automatically chains multiple credential sources, including environment variables, managed identity endpoints, and Visual Studio credentials, allowing the agent to authenticate to Azure services without hardcoding secrets. This aligns with the requirement to use managed identities for authentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Store connection strings in Azure Key Vault and reference them in the agent's configuration
Why it's wrong here
Connection strings are not needed with managed identities.
- ✗
Create a service principal in Microsoft Entra ID and assign RBAC roles to the agent's resource
Why it's wrong here
Service principal is not needed; managed identity is used.
- ✓
Use DefaultAzureCredential in the agent's code to authenticate to Azure services
Why this is correct
DefaultAzureCredential uses managed identity.
- ✗
Configure the agent to use an API key for each external service
Why it's wrong here
API keys are not managed identities.
- ✓
Assign a system-assigned managed identity to the Azure resource hosting the agent
Why this is correct
Managed identity is required for token-based auth.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 945-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.