I am trying to create an Azure KeyVault secret programmatically using Microsoft. Azure.KeyVault.KeyVaultClient. For my purposes, I get authentication authenticator authentication with a certificate as an Azure AD application. Azure AD already has certificate information in its manifest.
My code creates Azure KeyVault, providing "all" permissions for both secrets and keys to the Azure AD application object ID. I verify that this happened with Powershell to retrieve KeyVault and view access policies.
When I try to create a secret in this KeyVault using KeyVaultClient.SetSecretAsync (), I get an exception saying that "set operation is not allowed." with the status code "Forbidden".
Outside of the permissions set in KeyVault, do you need to provide any other permissions for anything else (such as Azure AD applications)?
source share