Skip to content

az keyvault secret show doesn't work with Key Vault Secrets User role #25177

@jumorelle

Description

@jumorelle

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command
az keyvault secret show

Describe the bug
It seems that the command always try to search for an access policy even if the keyvault is configured to use RBAC.

To Reproduce
Create a service principal
Create a keyvault using the RBAC mode (not the access policies)
Give the SP the Key Vault Secret User role
Create a secret
login with az cli using your SP
try to get the keyvaukt secret value with az cli

Expected behavior
The documentation should specify that only access policies are supported or the command should return the secret value.

Environment summary
Our tests was done on an azure devops agent in an AzureCli task. The service principal was configured using an Azure Devops Service Connection used by the AzureCli task.

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions