Connect Visual Studio to MS Azure Government


For the latest documentation on connecting via Visual Studio

Check out the Azure Environment Selector for VS 2017!

The Visual Studio (VS) IDE is a powerful development tool. Coupled with the massive list of development tools it provides, Visual Studio also allows servers to be managed.  This capability provides an end-to-end development and test experience, with the power to provision infrastructure and services at the fingertips of the developer.

MS Azure Government (MAG) is a completely isolated environment and as such requires unique Azure endpoints in order to mange the services offered there. MAG requires a management certificate to authenticate requests to the service management API behind the scenes in VS. The Publish Settings File contains both the unique endpoints and the management certificate. The following steps are similar across the various flavors of VS 2012, VS 2013 Community, and VS 2015 Preview.

  1. Open the Management Portal for MS Azure Government and download the Publish Settings File for your subscription.
    1. Link:
  2. Once your Publish Settings File is downloaded, in Visual Studio, right click on the Server Explorer and select Manage Subscriptions.
  3. Navigate to the Certificates Tab and click the Import Button.
  4. In the Import Microsoft Azure Subscriptions Dialog, browse to the location on disk where you saved the Publish Settings File in Step 1 and click the Import Button.
    1. NOTE: The publish settings file provides the management endpoint for each subscription (in a property called the ServiceManagementUrl)
  5. Verify that the MS Azure Government Regions populate on the Regions Tab

Well, that's it.  Happy provisioning your Azure Government infrastructure and services via the Visual Studio IDE!

Steve K.

Comments (4)

  1. Will says:

    These instructions are not compatible with VS 2015

  2. Kevin says:

    These instructions also did not work for me. I found another post that directs some registry settings that worked well.

  3. KevinStrat1 says:

    These instructions did not work for me either in Visual Studio 2015. I found another post that directs registry edits that worked well:

    1. Zach Kramer says:

      Thanks for calling this out. We did publish the updated docs last week. Please let us know if there is any feedback. We are working with the Visual Studio team to get this working in the UI but wanted to get something out there for everyone for the existing versions.

      Also, if there are other ways to connect to Azure gov that you want covered feel free to share those also. Thanks!

Skip to main content