Register Azure Stack with your Azure Subscription

Applies to: Azure Stack Development Kit

For Azure Active Directory deployments, you can register Azure Stack with Azure to download marketplace items from Azure and to set up commerce data reporting back to Microsoft.


Registration is recommended because it enables you to test important Azure Stack functionality, like marketplace syndication and usage reporting. After you register Azure Stack, usage is reported to Azure commerce. You can see it under the subscription you used for registration. Azure Stack Development Kit users will not be charged for any usage they report.

Get Azure subscription

Before registering Azure Stack with Azure, you must have:

  • The subscription ID for an Azure subscription. To get the ID, sign in to Azure, click More services > Subscriptions, click the subscription you want to use, and under Essentials you can find the Subscription ID. China, Germany, and US government cloud subscriptions are not currently supported.
  • The username and password for an account that is an owner for the subscription (MSA/2FA accounts are supported)
  • The Azure Active Directory for the Azure subscription. You can find this directory in Azure by hovering over your avatar at the top right corner of the Azure portal.
  • Registered the Azure Stack resource provider (see the Register Azure Stack Resource Provider section below for details)

If you don’t have an Azure subscription that meets these requirements, you can create a free Azure account here. Registering Azure Stack incurs no cost on your Azure subscription.

Register Azure Stack resource provider in Azure


This step only needs to be completed once in an Azure Stack environment.

  1. Start Powershell ISE as an administrator.
  2. Log in to the Azure account that is an owner of the Azure subscription with -EnvironmentName parameter set to "AzureCloud".
  3. Register the Azure resource provider "Microsoft.AzureStack".


Login-AzureRmAccount -EnvironmentName "AzureCloud"
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack -Force

Register Azure Stack with Azure


All these steps must be completed on the host computer.

  1. Install PowerShell for Azure Stack.
  2. Copy the RegisterWithAzure.ps1 script to a folder (such as C:\Temp).
  3. Start PowerShell ISE as an administrator.
  4. Run the RegisterWithAzure.ps1 script, replacing the following placeholders:

    • YourAccountName is the owner of the Azure subscription
    • YourID is the Azure subscription ID that you want to use to register Azure Stack
    • YourDirectory is the name of your Azure Active Directory tenant that your Azure subscription is a part of.

      RegisterWithAzure.ps1 -azureSubscriptionId YourID -azureDirectoryTenantName YourDirectory -azureAccountId YourAccountName

      For example:

      C:\temp\RegisterWithAzure.ps1 -azureSubscriptionId "5e0ae55d-0b7a-47a3-afbc-8b372650abd3" `
      -azureDirectoryTenantName "" `
  5. At the two prompts, press Enter.

  6. In the pop-up login window, enter your Azure subscription credentials.

Verify the registration

  1. Sign in to the administrator portal (https://adminportal.local.azurestack.external).
  2. Click More Services > Marketplace Management > Add from Azure.
  3. If you see a list of items available from Azure (such as WordPress), your activation was successful.

Next steps

Connect to Azure Stack