Home > front end >  Connect-AzAccount in C#
Connect-AzAccount in C#

Time:05-31

I have a question, and this is the last I would like to come to find an answer but I couldn't find nothing related to it using google, neither my knowledge(which is almost null/beginner).

I'm trying to create a Console Application using C#. On this application, I generated a "key" and this key I want to add in a secret on Azure Key Vault. I have done PowerShell scripts before to do the same process but when I tried in C#, I couldn't do that.

Does anyone know if that is actually possible? If yes, what is the best way to do that?

Thanks :-)

CodePudding user response:

While performing your requirement you first need to authenticate to Azure services. You can do this either by Azure CLI, Azure powershell or you can just directly sign in with your Azure Active Directory account by navigating to Tools >> Options >> Azure Service Authentication options through Visual Studio and then you are ready to perform the task.

You can follow the tutorial Azure Key Vault secrets client library for .NET for more information.

REFERENCES: Azure Identity client library for .NET - Azure for .NET Developers

  • Related