Training "Manage secrets in your server apps with Azure Key Vault" unit3, fail to add a secret

Zhen Gao 20 Reputation points Microsoft Employee
2024-06-18T08:00:09.3933333+00:00

In the training "Manage secrets in your server apps with Azure Key Vault" unit3 Exercise - Create a Key Vault and store secrets. For the second step - add the secret, I got "(Forbidden) Caller is not authorized to perform action on resource". I don't know how to check the role-based access control (RBAC) settings in the sandbox environment, as the answers in other similar questions.

Azure Training
Azure Training
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Training: Instruction to develop new skills.
1,304 questions
{count} votes

Accepted answer
  1. TP 83,731 Reputation points
    2024-06-18T08:21:49.58+00:00

    Hi,

    In the exercise, please use command similar to below to create the key vault. You need to substitute the correct sandbox resource group name for [sandbox 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 above command will create the Key Vault with permission model set to Vault access policy and grant your user account permission to perform necessary operations. In this way when you execute the command to create secret it will succeed.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful