Azure / Azure/azure-cli

KeyVault - Access Policy - BadRequest - az keyvault set-policy

Open
#18,430 7 comments 0 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-identity-squad KeyVault Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

If you try to set an access policy for a KeyVault you get a BadRequest Error. Same is happening with arm deployment.

**Command Name**
`az keyvault set-policy`

**Errors:**
```
(BadRequest) An invalid value was provided for 'accessPolicies'.
```

## To Reproduce:

`az keyvault set-policy -n --key-permissions get list --object-id "/subscriptions//resourceGroups//providers/Microsoft.Sql/servers/"`

## Expected Behavior

Access Policy set on KeyVault.

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.23.0 *

Also tested in: 2.24.2.

Extensions:
automation 0.1.0
azure-devops 0.18.0

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.