exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 4 question 47 discussion

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

You are developing an Azure Function that calls external APIs by providing an access token for the API. The access token is stored in a secret named token in an
Azure Key Vault named mykeyvault.
You need to ensure the Azure Function can access to the token. Which value should you store in the Azure Function App configuration?

  • A. KeyVault:mykeyvault;Secret:token
  • B. App:Settings:Secret:mykeyvault:token
  • C. AZUREKVCONNSTR_ https://mykeyveult.vault.ezure.net/secrets/token/
  • D. @Microsoft.KeyVault(SecretUri=https://mykeyvault.vault.azure.net/secrets/token/)
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
lorenaizzo
Highly Voted 1 year, 9 months ago
Selected Answer: D
It's right! D. https://docs.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-powershell
upvoted 17 times
TonyMel
1 year, 2 months ago
correct, in 2023Mar24, score: 904/1000.
upvoted 3 times
...
KingChuang
1 year, 5 months ago
On my exam 2022-12-26. Chose:Given Answer
upvoted 1 times
...
...
juanckar
Most Recent 11 months, 2 weeks ago
This was on the exam (July 2023). Went with proposed. Scored 917
upvoted 3 times
...
DarthVee
1 year, 1 month ago
According to ChatGPT its A: Option A is the correct value to store in the Azure Function App configuration. The format for referencing a secret stored in an Azure Key Vault is "KeyVault:{key vault name};Secret:{secret name}". Therefore, the correct value to store in the Azure Function App configuration to access the token stored in a secret named "token" in an Azure Key Vault named "mykeyvault" is "KeyVault:mykeyvault;Secret:token". Option B is not a valid format for referencing an Azure Key Vault secret. Option C is not a valid format for referencing an Azure Key Vault secret. This value appears to be an Azure Key Vault connection string. Option D is a Key Vault reference expression, which is used in Azure Resource Manager templates to reference a Key Vault secret or certificate. This is not the correct format to store in the Azure Function App configuration.
upvoted 2 times
Ciupaz
7 months, 1 week ago
Also Bard says D as answer.
upvoted 2 times
...
MikeAWS
8 months, 1 week ago
chatgpt changed his mind :), its saying D now
upvoted 2 times
...
...
surprise0011
1 year, 2 months ago
If you wonder why not A because syntax is incomplete. Should be like: @Microsoft.KeyVault(VaultName=myvault;SecretName=mysecret) https://learn.microsoft.com/en-us/azure/app-service/app-service-key-vault-references?tabs=azure-cli#reference-syntax
upvoted 2 times
...
TheExamMaster2020
1 year, 7 months ago
Did my exam on 15th November 2022. This question was on it.
upvoted 3 times
...
OPT_001122
1 year, 7 months ago
Selected Answer: D
Given answer is correct
upvoted 1 times
...
coffecold
1 year, 8 months ago
Selected Answer: A
The Azure Function must be able to access to the token (inside the code) All it needs is a vaultname and a secret name. var secretClient = new SecretClient( new Uri("https://<VaultName>.vault.azure.net"),new DefaultAzureCredential()); var secret = await secretClient.GetSecretAsync("<SecretName>"); the <SecretName> and the <Vaultname> come from your app settings
upvoted 2 times
...
nvtienanh
1 year, 8 months ago
Selected Answer: D
Given answer is correct
upvoted 2 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 ...