Saltar al contenido principal


We released 1.1 of the Azure Management Libraries for .NET. This release adds support for:

Cosmos DB Azure Container Service and Registry Active Directory Graph

Getting started

You can download 1.1 from:


Create a Cosmos DB with DocumentDB API

You can create a Cosmos DB account by using a define() … create() method chain.

var documentDBAccount = azure.DocumentDBAccounts.Define(docDBName)

In addition, you can:

Create an Azure Container Registry

You can create an Azure Container Registry by using a define() … create() method chain.

var azureRegistry = azure.ContainerRegistries.Define("acrdemo")

You can get Azure Container Registry credentials by using ListCredentials().

RegistryListCredentials acrCredentials = azureRegistry.ListCredentials();

Create an Azure Container Service with Kubernetes Orchestration

You can create an Azure Container Service by using a define() … create() method chain.

var azureContainerService = azure.ContainerServices.Define(acsName)
      .WithServicePrincipal(servicePrincipalClientId, servicePrincipalSecret)

Create Service Principal with Subscription Access

You can create a service principal and assign it to a subscription with contributor role by using a define() … create() method chain.

var servicePrincipal = authenticated.ServicePrincipals.Define("spName")
      // define credentials
      // define certificate credentials
            // export credentials to a file
            .WithAuthFileToExport(new StreamWriter
                                     (new FileStream(authFilePath, FileMode.OpenOrCreate)))
      .WithNewRoleInSubscription(role, subscriptionId)

Similarly, you can:

Try it

You can get more samples from GitHub. Give it a try and let us know what do you think by emailing us or commenting below.

  • Explore


    Let us know what you think of Azure and what you would like to see in the future.


    Provide feedback

  • Build your cloud computing and Azure skills with free courses by Microsoft Learn.


    Explore Azure learning

Join the conversation

Leave a Reply

Your email address will not be published. Required fields are marked *