azure keyvault role assigment for secret
This is a common workflow where user would be granted acceptes to a secret.
However role assignment to secret + version level can still happened like what we see here. But it is invalid. You won't be able to access the secret and the role assignment won't appear either
Command will be successful but don't do this
az role assignment create
assignee 868f2c6b-a124-45b5-b0d1-ae6e408a7098
--role "4633458b-17de-408a-b874-0445c86b69e6"
--scope /subscriptions/tenand-id/resourceGroups/mytest-kv-rg/providers/
Microsoft.KeyVault/vaults/pv-test-kv-dev/secrets/mytestsecet/
550070619b634bee99d2b72d8e3616d8
Instead we should grant role assignment to secret level as the lowest level, for example. Then your role assignment magically appears as well
az role assignment create assignee 868f2c6b-a124-45b5-b0d1-ae6e408a7098
--role "4633458b-17de-408a-b874-0445c86b69e6"
--scope /subscriptions/tenantid/resourceGroups/mytest-kv-rg/providers/
Microsoft.KeyVault/vaults/pv-test-kv-dev/secrets/mytestsecet
Comments