Error creating Secrets in new Key Vault

Donald Wickman (DXC Technology Services LLC) 40 Reputation points Microsoft Employee
2026-07-13T20:45:31.0333333+00:00

I am the Owner, Key Vault Contributor, and Key Vault Reader on a new Key Vault, yet every time I attempt to create a Secret I get a simlpe "There was an error creating the secret" message.
This has persisted over 2 weeks, AI tool is non-productive in resolving issue.

Please assist. I have used other key vaults without issue.

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.


Answer accepted by question author
Christos Panagiotidis 3,551 Reputation points
2026-07-14T07:07:23.2533333+00:00

Hi, Key Vault has separate management-plane and data-plane permissions. Owner/Contributor can manage the vault resource but does not automatically allow writing secrets. Check the vault's Access configuration: if it uses Azure RBAC, assign yourself Key Vault Secrets Officer (or Administrator only if genuinely needed) at the vault scope and allow a few minutes for propagation; if it uses access policies, add secret Set/Get permissions there instead. Also check Networking, because a public-network/firewall or private-endpoint restriction can produce a generic portal error. The activity log covers resource operations, while the browser/network response or Key Vault diagnostic logs will usually reveal whether the secret write failed with 403, networking, or policy denial.

Was this answer helpful?

1 person found this answer helpful.

Answer accepted by question author
Salamat Shah 740 Reputation points MVP
2026-07-14T06:59:30.7566667+00:00

Dear Donal

Please first verify your permissions on the Key Vault. To create secrets, ensure you have the required RBAC roles, such as Key Vault Administrator, along with appropriate access management permissions (for example, Owner and User Access Administrator if role assignments are required). If these roles are already assigned, allow time for RBAC propagation and then try again.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Alex Burlachenko 25,285 Reputation points MVP Volunteer Moderator
    2026-07-14T07:46:36.7633333+00:00

    hi Donald Wickman (DXC Technology Services LLC) & thx for sharing urs issue here at Q&A portal,

    RBAC assignments look fine, so I'd check whether the vault is using the Azure RBAC permission model or the Vault access policy permission model. Having the Owner role alone doesn't automatically give permission to create secrets if the vault is configured to use access policies instead of RBAC, try creating the secret with Azure CLI or PowerShell. If the portal just says 'There was an error creating the secret' the CLI usually returns the actual error code, which is much more useful

    az keyvault secret set --vault-name <vault-name> --name test-secret --value test

    If that fails, please share the full error message.

    I'd also review the Activity Log and the AuditEvent logs (if diagnostic logging is enabled) to see whether the request is being denied or failing internally. If this is happening only with this specific Key Vault, has persisted for two weeks, and the CLI returns the same generic failure, it may be a vault-specific backend issue. In that case, I'd open a support request with the vault name, subscription, region, timestamp of a failed attempt, and the correlation ID from the failed operation if one is available. That will let the Key Vault team trace the request on the service side.

    rgds,

    Alex

    &

    If my answer was helpful pls mark it and additional thx if u follow me at Q&A portal

    and at my blog https://ctrlaltdel.blog/

     

    Was this answer helpful?


Your answer

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