Insufficient access for "Create a Key Vault and store secrets"

Kyle Enman 0 Reputation points
2024-12-13T11:42:19.9633333+00:00
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,342 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Harshitha Eligeti 1,210 Reputation points Microsoft Vendor
    2024-12-13T21:12:26.8533333+00:00

    Hi @ Kyle Enman • 

    Thank you for sharing your issue on Microsoft Q&A. 

    I understand that you are encountering an error message stating that the caller is not authorized to perform the action of setting a secret in Azure Key Vault. It seems like you are facing an issue with Set-AzKeyVaultSecret.    

    Please use the command below to build the key vault. You must substitute the correct sandbox resource group name for [resource group name] and enter a unique vault name. 

    az keyvault create --resource-group "[sandbox resource group name]" --location centralus --name <your-unique-vault-name> --enable-rbac-authorization false
    

    The command above will create the Key Vault with the permission model set to Vault access policy and provide your user account permission to perform the required tasks. In this method, when you run the command to create a secret, it will succeed.   

    Hope this helps. Do let us know if you have any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

       
    Best Regards. 
    Harshitha Eligeti.


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.