Azure Key Vault connected service in Visual Studio 2017

Azure Key Vault connected service in Visual Studio 2017

Azure Key Vault connected service in Visual Studio is now available. Visual Studio Connected Services enables developers to easily connect and integrate with several Cloud services.  We have seen several Azure connected services including Application Insights, Azure Storage, Mobile services, Cosmos DB etc. Furthermore, we secure our application by moving secrets from the source code into Azure Key Vaults. With the recent update of Visual Studio, you can now connect Azure Key Vault using connected services from Visual Studio and easily access the Azure key vault rest API’s.

Azure Key Vault connected service in Visual Studio

If you have the recent updates to the Visual Studio (version 15.7 Preview 3), you will find the “Secure Secrets with Azure Key Vault” as a Connected Service.

Azure Key Vault connected service in Visual Studio : Azure Key Vault Connected Service
Once you select the “Secure Secrets with Azure Key Vault” option from the connected services list, Visual Studio allows you to create a Key Vault under the logged in Azure Subscription. You can choose key vault name, resource group, location, and pricing tier using the Visual Studio tooling.

Azure Key Vault connected service in Visual Studio : Create New Azure Key Vault

Post all the options section, click on “Add”. Visual Studio now will automatically add required configuration, NuGet packages to the project, and enable you to access secrets from the Key Vault in your application.

Creating Azure Key Vault

Related Tip: Quickly connect Azure Cosmos DB with your applications using Visual Studio Connected Services

Visual Studio will also create the Azure Key Vault in the selected subscription. Once the Key Vault has been created, you will be able to manage secrets and permissions directly through the Azure portal.

Azure Key Vault Option

 

Now you can use the API for key vaults and access the secrets and this is available for both ASP.NET and ASP.NET Core Application. With the help of Azure Connected Services for Key Vault, securing project’s secrets is now easier than ever.

Hope this helps.

Geek's Choice

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.