MSEndpointMgr

Cloud Management Gateway deployment failed due to missing Resource Provider in Azure Subscription

Deploying a Cloud Management Gateway (CMG) with ConfigMgr requires access to an Azure Subscription. Additionally, the CMG is deployed using a resource provider named Microsoft.ClassicCompute. Newly registered Azure Subscriptions doesn’t have the this resource provider registered by default, which will cause the deployment of a CMG to fail with the first error message that as below followed by other error messages:

ERROR: Resource Manager – Failed to finish deployment. Check [Monitor/Activity log] on Azure Portal for more information

As shown in the picture below, if the Microsoft.ClassicCompute resource provider is not registered in the Azure Subscription that was selected during the Create Cloud Management Gateway wizard, the deployment fails miserably.

The first error message displayed doesn’t really tell us much other than to check the Activity log in the Azure portal. Instead of checking the portal, the actual error message is shown in the second error presented in the CloudMgr.log:

Error message details that describes the issue: “code”:”MissingSubscriptionRegistration”,”target”:”Microsoft.ClassicCompute”,”message”:”The subscription is not registered to use namespace ‘Microsoft.ClassicCompute’

From the above message, that has been amended to only show the important part, lies the real issue. That being the ‘MissingSubscriptionRegistration’ error code and for the ‘Microsoft.ClassicCompute’ target.

Solution

Fortuantely, there’s an easy fix for this. You could either browse to your Azure Subscription through the Azure portal and register the resource provider, or use PowerShell to accomplish the same task.

Option 1 – Azure Portal

  • From within the Azure portal, select All Services and then Subscriptions.
  • Selected the same subscription selected when configuring the CMG deployment.
  • Under Settings, locate Resource Providers and the Microsoft.ClassicCompute provider and select Register.

Option 2 – PowerShell

  • Install the Az.Resources PowerShell module and any prerequisite modules it may need using Install-Module -Name Az.Resources.
  • Use the Connect-AzAccount to authenticate against Azure.
  • Run the following command to register the resource provider:
    Register-AzResourceProvider -ProviderNamespace ‘Microsoft.ClassicComputer’

You should now delete the existing Cloud Management Gateway deployment, there’s unfortunately no way to trigger a re-deployment, and create the same deployment once more. This time the deployment should go through if your configuration is correct.

If you’re looking for a complete blog post that covers all the required steps for setting up a Cloud Management Gateway using E-HTTP, check out the following post.

(6290)

Nickolaj Andersen

Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences such as Microsoft Ignite, NIC Conference and IT/Dev Connections including nordic user groups.

2 comments

  • This helped me once before. Good thing that you also created an article for everyone else who comes up with the same issues. Thank you and have a great holiday!

Sponsors