Thank you for post!
The issue might be that you are using the wrong API version for the Microsoft.KeyVault/vaults
resource. In your code, you are using the API version 2022-11-01
for the keyVault
resource, but you are using the API version 2019-09-01
for the keyVaultPolicies
resource.
You should use the same API version for both resources. You can update the keyVaultPolicies
resource to use the same API version as the keyVault
resource by changing the Microsoft.KeyVault/vaults@2019-09-01
to Microsoft.KeyVault/vaults@2022-11-01
.
Also, could you please refer the following document Microsoft.KeyVault vaults/accessPolicies
Hope this helps. Do let us know if you any further queries.
Thanks,
Akhilesh.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.