AZ-204 Practice Question: System-assigned managed identity for Function App…
This AZ-204 practice question tests your understanding of system-assigned managed identity for function app…. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: managed identity. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
The team is writing an Azure Function that needs to retrieve secrets from Azure Key Vault at runtime. The security policy prohibits storing client secrets, connection strings, or certificates in application settings or source code. What is the recommended approach?
Answer choices
Why each option matters
Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.
Best answer
Enable a system-assigned managed identity on the Function App and grant it Key Vault Secrets User (or Get/List access policy) permission on the vault
The managed identity removes all credential management from the developer. DefaultAzureCredential automatically detects the managed identity context and requests tokens from the Azure Instance Metadata Service. No secret is ever stored anywhere the developer can access or accidentally expose.
Distractor review
Create an App Registration, generate a client secret, store the secret in an Application Setting, and authenticate using ClientSecretCredential
This approach works but violates the security policy — the client secret lives in application settings, which is a form of stored credential. Application settings are visible to anyone with Contributor access to the Function App.
Distractor review
Generate a Key Vault SAS token and embed it in the function's connection string setting
Key Vault does not use SAS tokens. SAS tokens are an Azure Storage concept. Key Vault uses OAuth 2.0 bearer tokens issued by Azure Active Directory — managed identity is the correct credential-free mechanism.
Distractor review
Use the Key Vault REST API with the vault's access key embedded in the code
Key Vault does not expose access keys in the same way storage accounts do. Access is controlled by Azure AD identity and permissions. Embedding any static credential in code violates the security policy and creates secret rotation and leakage risks.
Common exam trap
Common exam trap: answer the scenario, not the keyword
Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.
Technical deep dive
How to think about this question
Treat this as a scenario question. Identify the problem, the constraint, and the best action. Then compare each option against those facts.
KKey Concepts to Remember
- managed identity
- system-assigned
- Key Vault access
- credential-free authentication
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
managed identity
Related practice questions
Related AZ-204 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
More questions from this exam
Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.
Question 1
An application stores customer invoices in Azure Blob Storage. Deleted blobs must be recoverable for 14 days. What should be enabled?
Question 2
You are deploying a containerized application to Azure Container Instances. The application requires a custom domain name and SSL/TLS termination. You need to configure these features. Which resource should you create alongside the container group?
Question 3
A developer needs to run a Kusto query against application request data to identify 95th percentile latency by operation. Where should the query be run? The architecture review board prefers a managed AWS-native control.
Question 4
You are developing a web app that authenticates users via Microsoft Entra ID. The app needs to read the user's profile and send emails on their behalf. You want to minimize user consent prompts. Which OAuth 2.0 grant type should you use?
Question 5
You are developing an Azure Function that processes messages from an Azure Service Bus queue. The function uses a Service Bus queue trigger and runs on a Consumption Plan. The queue receives a high volume of messages in bursts. You need to ensure that the function scales out to handle the load but does not exceed 10 concurrent instances. Which configuration should you apply?
Question 6
You are monitoring an Azure App Service using Application Insights. You notice that the server response time is high for certain requests. You need to drill down to see which external dependencies (like databases or APIs) are causing the delay. Which Application Insights feature should you use?
Practice this exam
Start a free AZ-204 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this AZ-204 question test?
managed identity
What is the correct answer to this question?
The correct answer is: Enable a system-assigned managed identity on the Function App and grant it Key Vault Secrets User (or Get/List access policy) permission on the vault — A system-assigned managed identity is an Azure Active Directory identity tied to the lifecycle of the Function App. When enabled, Azure automatically issues and rotates credentials on behalf of the identity. The function code uses DefaultAzureCredential (or ManagedIdentityCredential) to obtain tokens from the managed identity endpoint at runtime — no credentials are ever stored in configuration or code. A Key Vault access policy or RBAC role grant gives the identity permission to read secrets.
What should I do if I get this AZ-204 question wrong?
Review managed identity, then practise related AZ-204 questions on the same topic to reinforce the concept.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Discussion
Sign in to join the discussion.
This AZ-204 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 AZ-204 exam.