exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 4 question 98 discussion

Actual exam question from Microsoft's AZ-104
Question #: 98
Topic #: 4
[All AZ-104 Questions]

You have an Azure AD tenant named contoso.com.

You have an Azure subscription that contains an Azure App Service web app named App1 and an Azure key vault named KV1. KV1 contains a wildcard certificate for contoso.com.

You have a user named [email protected] that is assigned the Owner role for App1 and KV1.

You need to configure App1 to use the wildcard certificate of KV1.

What should you do first?

  • A. Create an access policy for KV1 and assign the Microsoft Azure App Service principal to the policy.
  • B. Assign a managed user identity to App1.
  • C. Configure KV1 to use the role-based access control (RBAC) authorization system.
  • D. Create an access policy for KV1 and assign the policy to User1.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
macinpune9
Highly Voted 1 year, 9 months ago
Please check this tutorial https://learn.microsoft.com/en-us/azure/key-vault/general/tutorial-net-create-vault-azure-web-app First Step is to Assign a managed identity to the App. Answer: B
upvoted 49 times
Akriu
1 year, 9 months ago
I'm also in for answer B, since answer A needs a service principal. The only way to get one for a service is a managed identity (system or user generated). https://learn.microsoft.com/en-us/azure/key-vault/general/assign-access-policy?tabs=azure-portal https://learn.microsoft.com/en-us/azure/key-vault/general/authentication
upvoted 5 times
Batiste2023
1 year, 7 months ago
Thanks for your input! You say that "the only way to get one for a service is a managed identity (system or user generated)." - Can you elaborate on that? I have found these sources that says that as soon as you register a web app with Entra ID as authorization provider, the app also receives a service principal: - https://learn.microsoft.com/en-us/purview/create-service-principal-azure - https://learn.microsoft.com/en-us/azure/app-service/scenario-secure-app-authentication-app-service In that case, answer A would still be an option, as far as I can see.
upvoted 1 times
...
...
SDiwan
1 year, 4 months ago
Option B is managed user identity. Its not necessary to have user managed identity, system identity can also work.
upvoted 3 times
...
...
[Removed]
Highly Voted 1 year, 9 months ago
In this scenario, you have an Azure App Service web app (App1) and an Azure Key Vault (KV1) containing a wildcard certificate for contoso.com. You want to configure App1 to use the wildcard certificate from KV1. To achieve this, you need to grant the necessary permissions to App1. Access to Key Vault secrets and certificates is managed using Azure AD-based authentication and authorization. The Microsoft Azure App Service principal represents the App Service web app in Azure AD. The correct approach is to create an access policy in KV1 that grants the necessary permissions to the Microsoft Azure App Service principal associated with App1. By doing so, you allow App1 to access the certificate stored in KV1. So, the first step you should take is: A. Create an access policy for KV1 and assign the Microsoft Azure App Service principal to the policy. Once you've granted the necessary access to the App Service principal, the web app (App1) will be able to use the wildcard certificate from KV1 for its secure connections.
upvoted 20 times
...
marek_jazz
Most Recent 4 weeks ago
Selected Answer: A
When you import a Key Vault certificate into an App Service, the resource provider (Microsoft Azure App Service) – not the app’s own identity – must be able to read the secret/certificate in the vault. Microsoft Learn states that you must first grant that resource-provider principal Get permissions on secrets/certificates via an access policy or RBAC before the import will succeed Assigning a managed identity to the web app (option B) is required for Key Vault configuration/secret references inside app settings, but it isn’t used for bringing a TLS/SSL certificate into the app. Switching KV1 to RBAC mode (option C) or adding user1 (option D) doesn’t give the App Service resource provider the needed rights. Therefore, the first action is to create that Key Vault access policy for the Microsoft Azure App Service principal.
upvoted 1 times
...
70ec7c1
1 month, 1 week ago
Selected Answer: B
Using the Microsoft Azure App Service Principal is to broad of an identity. It is not associated with an objectID that directly associates it with App1. That means any App Service within the tenant will gain the same access rights. Using Managed Identity is the current (2025) recommended method. However, the confusion in this question steps from the use of the word "User" in the middle of Managed Identity. One has to assume that the question is referring to a user created MI. Best practice is to use system-assigned MI. However, given current choices, I believe the best answer still is using a user created MI. This limits the scope to just App1.
upvoted 1 times
...
minura
6 months, 1 week ago
Selected Answer: B
To configure App1 to use the wildcard certificate stored in KV1, the first step involves ensuring that App1 can authenticate and retrieve the certificate securely. This requires assigning a managed identity to App1 so it can access KV1 without relying on explicit credentials. Therefore, the correct answer is: B. Assign a managed user identity to App1.
upvoted 1 times
...
sca88
6 months, 4 weeks ago
Selected Answer: A
B it's wrong: it says "Assign a managed USER identity", but App1 is not a user... so the only acceptable it's A
upvoted 1 times
...
[Removed]
9 months ago
Selected Answer: B
it´s B
upvoted 2 times
...
Pcservices
9 months, 1 week ago
The correct first step in configuring App1 to use the wildcard certificate stored in KV1 is: B. Assign a managed user identity to App1. Explanation: To allow App1 to securely access the certificate from KV1 without using secrets (like keys or passwords), the most secure and preferred approach is to assign a Managed Identity to App1. Managed identities in Azure provide an automatic identity for the app, allowing it to authenticate against Azure services like Key Vault without embedding credentials in your code. Once the managed identity is assigned to App1, you can grant it the necessary access (read) to the Key Vault by configuring an Access Policy.
upvoted 3 times
...
adilkhan
11 months, 4 weeks ago
B. Assign a managed user identity to App1.
upvoted 2 times
...
Limobakry
1 year, 1 month ago
Currently, App Service certificates support only Key Vault access policies, not the RBAC model. https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-app-service-certificate?tabs=portal
upvoted 1 times
...
WeepingMaplte
1 year, 1 month ago
Selected Answer: B
Creating a Microsoft Entra application and service principal adds more operational overheads and eliminate many of the security risks associated with manually managing credentials. This feels like an AZ-305 question.
upvoted 2 times
...
op22233
1 year, 1 month ago
Selected Answer: B
https://devblogs.microsoft.com/devops/demystifying-service-principals-managed-identities/
upvoted 2 times
...
rajsingh
1 year, 2 months ago
Selected Answer: B
Answer B is correct
upvoted 3 times
...
Harry300
1 year, 3 months ago
Selected Answer: B
I tested it on the lab and B is right. When creating a key vault with a vault access policy, the app can't be selected unless the managed identity has been enabled.
upvoted 4 times
...
Amir1909
1 year, 3 months ago
A is correct
upvoted 2 times
...
metzger
1 year, 3 months ago
Confirmed in Azure Portal - an Azure App Service has the (system-assigned) Managed Identity set to OFF by default so first step is to enable the managed identity.
upvoted 1 times
...
BluAlien
1 year, 4 months ago
Selected Answer: B
Access can be done either using RBAC or Access Policy. In both cases the first Action is to configure a Managed User (or System) Identity to App1 because by default Identities are disabled.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...