unable to pick password define in a keyvault resource while creating a virtual machine via ARM Template

Ibrahim Adeniregun 71 Reputation points
2022-09-10T18:49:28.57+00:00

Hi, i'm getting the below error during virtual machine creation using an ARM template, I have specified a separate template to get the password from the KeyVault. Error below

New-AzResourceGroupDeployment : 7:16:13 PM - Error: Code=KeyVaultParameterReferenceSecretRetrieveFailed; Message=The secret of KeyVault parameter 'credential' cannot be
retrieved. Http status code: 'Forbidden'. Error message: 'Access denied to first party service.
Caller: name=ARM;tid=f8cdef31-a31e-4b4a-93e4-5f571e91255a;appid=797f4846-ba00-4fd7-ba43-dac1f8f63013;oid=f248a218-1ef9-47bf-9928-ae47093fd442;iss=https://sts.windows.net/f8
cdef31-a31e-4b4a-93e4-5f571e91255a/
Vault: specialkeyvault;location=uksouth'. Please see https://aka.ms/arm-keyvault for usage details.

239650-image.png

Below are my configurations .

Parameter declared for Virtual machine admin password

239755-image.png

Parameter inserted into the OsProfile

239714-image.png

Second template where i reference the KeyVault

239715-image.png

Thanks

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,258 questions
Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
295 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. risolis 8,721 Reputation points
    2022-09-10T19:46:23.12+00:00

    Hello @Ibrahim Adeniregun

    Thank you for your heads up.

    I would like to provide the next relevant note which could fit into for what you were describing previously.... So please down below:

    ARM template deployments with Key Vault Secrets User and Key Vault Reader role assignments.

    I hope you can find this useful to overcome your concern.

    Looking forward to your feedback,

    Cheers,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.