Connecting to a Media Services account located in Azure Government

Shawn Weisfeld

The full details of how to connect are listed in this MSDN article, however the connection information for Azure Government is a bit different then on the public cloud.

Connecting a two-step process, first you setup your credential and then you create your context. To connect to Azure Government you will need to take advantage of the following overloads:
// Create and cache the Media Services credentials in a static class variable.
_cachedCredentials = new MediaServicesCredentials(

// Use the cached credentials to create CloudMediaContext.
_context = new CloudMediaContext(new Uri(_apiServerAddress),

You get the account name and key via the Azure portal, just press the “Manage Keys” button.
The Media Context Scope should be set to “urn:WindowsAzureMediaServices”.
The Acs Base Address should be set to “”
The API Server Address depends on what region you are deployed to:
  US Gov Virginia is “”
  US Gov Iowa is “”


Discussion is closed.

Feedback usabilla icon