0

Is there a way to update KeyVault access policy with C# SDK?

It is rather easy to do it with Powershell Set-AzureRmKeyVaultAccessPolicy, but I can't seem to find the same method in C# SDK.

1 Answer 1

1

KeyVault PowerShell uses the KeyVault Management C# SDK - https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.management.keyvault.keyvaultmanagementclient

Here is it's usage:

https://github.com/Azure/azure-powershell/blob/master/src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultAccessPolicy.cs#L268

https://github.com/Azure/azure-powershell/blob/master/src/ResourceManager/KeyVault/Commands.KeyVault/Models/VaultManagementClient.cs#L135

So, the answer to your question is no. Having said that, I hope the above reference helps you.

Sign up to request clarification or add additional context in comments.

1 Comment

Actually there is a way and your answer pointed me into the right direction. learn.microsoft.com/en-us/dotnet/api/…. If you edit the answer with the link, I will definitely accept it :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.