I recently tried to create a secret in my Azure key vault, but I got this error after clicking the Create button.
Table of Contents
The operation is not allowed by RBAC.
The complete error message was as below
The operation is not allowed by RBAC. If role assignments were recently changed, please wait several minutes for role assignments to become effective.You can see the same error message in the screenshot below.

Solution
Below are the steps I followed to fix this issue.
1. Log in to Azure Portal.
2. Search for Key Vault and click on the search result

3. Click on the key vault where you wish to create the secret.

4. On the key vault page, click the Access control (IAM) link from the left navigation, then click on the Add role assignment option from the + Add dropdown.

5. Search for key vault Administrator. Click on the key vault Administrator option and then click on the Next button, as shown in the screenshot below.

6. Select the user, group, or service principal option and click on the + Select members link as shown in the screenshot below.

Check out How To Create Secret In Azure Key Vault
7. Search for your name or email address and select it, then click on the select button.

Now, the Add role assignment window will look like the one below. Click on the Review + Assign button in the screenshot below.

8. Click the Review + Assign button in the next window again.
Now, you can see the user was successfully added as a key vault administrator. Check out the screenshot below.

Now, I tried recreating the secret, and this time, I could successfully create the Azure key vault secret. See the screenshot below.

You may also like the following articles below

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
