Study guide
1.3 Security and Access Management
Azure AI Engineer Associate AI-102
Track your progress as you read
Finished sections get a check mark.
1 Introduction
About the Azure AI Engineer Associate (AI-102) Exam Study Strategies and Exam Tips for the AI-102
2 Domain 1: Plan and Manage an Azure AI Solution (20-25%)
1.1 Azure AI Services Overview and Selection 1.2 Resource Provisioning and Configuration 1.3 Security and Access Management 1.4 Responsible AI Principles and Implementation 1.5 Azure AI Solution Architecture Patterns
3 Content Safety and Moderation (within Plan and Manage, Domain 1)
2.1 Azure AI Content Safety Overview 2.2 Prompt Shields and Adversarial Attack Detection 2.3 Text and Image Moderation Implementation 2.4 Content Filtering in Azure OpenAI Service
4 Domain 4: Implement Computer Vision Solutions (10-15%)
3.1 Azure AI Vision — Image Analysis 4.0 3.2 Azure AI Face Service 3.3 Azure AI Custom Vision 3.4 Optical Character Recognition (OCR) 3.5 Video Analysis and the Retired Spatial Analysis
5 Domain 5: Implement Natural Language Processing Solutions (15-20%)
4.1 Azure AI Language — Text Analytics Features 4.2 Conversational Language Understanding (CLU) 4.3 Custom Text Classification and Custom NER 4.4 Azure AI Speech Services 4.5 Azure AI Translator Service 4.6 Question Answering and Conversational AI
6 Domain 6: Implement Knowledge Mining and Information Extraction Solutions (15-20%)
5.1 Azure AI Search — Fundamentals and Architecture 5.2 AI Enrichment with Skillsets 5.3 Azure AI Document Intelligence
7 Domain 2: Implement Generative AI Solutions (15-20%)
6.1 Azure OpenAI Service — Models and Deployment 6.2 Chat Completions API and Prompt Engineering 6.3 Embeddings and Vector Search for RAG 6.4 Fine-Tuning and Model Customization 6.5 Image Generation (gpt-image; DALL-E 3 Retired) 6.6 RAG After On Your Data, and AI Agents
8 Domain 3: Implement an Agentic Solution (5-10%)
3.1 Agentic Solutions: Foundry Agent Service and the Microsoft Agent Framework
9 Exam Review: Cross-Domain Topics and Advanced Practice
7.1 Service Comparison and Selection Guide 7.2 SDK and REST API Patterns 7.3 Responsible AI Across All Domains 7.4 End-to-End Solution Architectures 7.5 Exam Day Quick Reference
1.3 Security and Access Management
Key Takeaways Explain This Topic AI
Managed identities (system-assigned tied to a resource, user-assigned shareable) remove all credentials from code and are the production-preferred auth method.
Azure Key Vault centralizes secrets; apps read them at runtime using a managed identity, never hardcoded keys.
RBAC data-plane vs management-plane is heavily tested: Cognitive Services User calls APIs; Cognitive Services Contributor manages resources.
Azure OpenAI has its own roles — Cognitive Services OpenAI User (inference) and OpenAI Contributor (deploy/fine-tune).
Private endpoint plus disabled public network access is the most secure network posture for an AI resource.
Last updated: June 2026
Quick Answer: Authenticate with managed identities (no secrets in code), store any unavoidable secrets in Azure Key Vault , grant least privilege with RBAC (data-plane vs management-plane), and isolate the network with a private endpoint + disabled public access . Microsoft Entra ID beats API keys for production.
Authentication ladder, least to most secure
- Method Header / mechanism When acceptable
- API keys Ocp-Apim-Subscription-Key: <key> Dev/test only — keys leak in code, logs, configs
- Entra ID tokens OAuth 2.0 bearer token Production; integrates with RBAC
- Service principal App registration + secret/cert CI/CD and non-Azure callers
- Managed identity Azure-issued token, auto-rotated Best practice for Azure-hosted apps
System-assigned managed identity is created with the resource and dies with it (1:1). User-assigned is a standalone resource you can attach to many compute hosts (1:N) — pick it when several apps share one identity. Either way, DefaultAzureCredential resolves the identity transparently. # No keys anywhere in the code path
- from azure.identity import DefaultAzureCredential
- from azure.ai.textanalytics import TextAnalyticsClient
- client = TextAnalyticsClient(
- endpoint="https://my-language.cognitiveservices.azure.com/",
- credential=DefaultAzureCredential())
On the Exam: A production scenario that says "authenticate without storing secrets" almost always answers managed identity with DefaultAzureCredential . API keys are correct only when the scenario is explicitly dev/test or a quick prototype.
Azure Key Vault integration
When a secret is genuinely unavoidable (a third-party token, a connection string), store it in Key Vault and read it at runtime — the app authenticates to Key Vault with its managed identity. from azure.identity import DefaultAzureCredential
- from azure.keyvault.secrets import SecretClient
- sc = SecretClient("https://my-kv.vault.azure.net/", DefaultAzureCredential())
- ai_key = sc.get_secret("AiServiceKey").value
Key Vault adds soft delete (recover deleted secrets within the retention window) and purge protection (block permanent deletion during retention) — both appear in compliance-flavored questions.
RBAC: data plane vs management plane
This distinction is the highest-yield security topic in Domain 1.
- Role Plane Can do Cannot do
- Cognitive Services User Data Call APIs, read keys Create/delete the resource
Cognitive Services Contributor Management Create/update/delete resources, manage keys (overly broad for an app)
- Cognitive Services OpenAI User Data Run completions, embeddings, chat Deploy models, fine-tune
- Cognitive Services OpenAI Contributor Management Deploy models, manage fine-tuning —
- Reader Management View config Any write or API call az role assignment create \
- -assignee <managed-identity-object-id> \
- -role "Cognitive Services User" \
- -scope /subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.CognitiveServices/accounts/<name>
A frequent trap: granting Contributor to an app that only needs to call APIs. The least-privilege answer is Cognitive Services User (or OpenAI User for GPT). Contributor is for the DevOps team that provisions the resource, not the runtime workload.
Network isolation
Virtual network service rules restrict the resource to named subnets and deny the public internet.
Private endpoint projects a private IP for the resource inside your VNet; traffic stays on the Microsoft backbone, and private DNS resolves the endpoint to that IP.
Firewall rules allow specific IP ranges or trusted Azure services. az cognitiveservices account network-rule add -g rg-ai-prod -n my-ai-services \
- -vnet-name my-vnet --subnet my-subnet
- az cognitiveservices account update -g rg-ai-prod -n my-ai-services \
- -public-network-access Disabled
On the Exam: "The AI service must not be reachable from the internet" => private endpoint + public network access Disabled . Just adding a VNet rule without disabling public access still leaves a public attack surface, so the most-secure answer always pairs the two.
Diagnostic logging and monitoring
Enable diagnostic settings to stream logs and metrics to a Log Analytics workspace , Storage account , or Event Hub , then alert on anomalies.
- Metric Watch for Suggested alert
- Total Calls Traffic spikes Baseline + 50%
- Total Errors Failing requests > 5% error rate
- Latency Slow responses > 2 s (service-dependent)
- Blocked Calls (429) Rate limiting Any occurrence
- Token Usage Approaching OpenAI quota Near deployment cap
Log Analytics (KQL queries) is the right sink when a question asks about querying or correlating logs; Storage suits long-term archival; Event Hub suits streaming to a SIEM.
Layering the controls together
A production-grade AI deployment stacks these controls rather than picking one. The reference posture the exam rewards looks like this: the app runs with a managed identity that holds the Cognitive Services User role scoped to exactly the one resource it calls; any third-party secret it needs sits in Key Vault , read at runtime through the same identity; the AI resource has public network access Disabled with a private endpoint in the app's VNet; and diagnostic settings stream metrics and logs to Log Analytics with alerts on error rate and 429 throttling.
No API key appears in code, config, or environment variables anywhere in that chain. When a question describes a near-complete version of this and asks for the one missing control, identify which layer is absent — usually it is the network isolation (private endpoint) or the least-privilege scope (Contributor used where User suffices).
Scope and inheritance pitfalls
RBAC role assignments inherit down the hierarchy: an assignment at the subscription or resource group level flows to every AI resource inside it, while an assignment at the resource level is the tightest scope. The least-privilege answer almost always scopes the role to the single resource, not the resource group. Watch for distractors that grant the right role at too broad a scope.
Also remember that Owner and Contributor at the management plane do not by themselves grant data-plane API access for some services — calling the data plane needs the specific data-plane role (Cognitive Services User, or OpenAI User for GPT), which is why an admin can manage a resource yet get a 401 calling its API until the data-plane role is added.
On the Exam: If a person can deploy and delete a resource but gets an authorization error calling its inference API, the missing piece is a data-plane role such as Cognitive Services User or Cognitive Services OpenAI User — management-plane roles do not imply data-plane access.