Close Menu
    Facebook X (Twitter) Instagram
    Trending
    • Workplace Ninja User Group Denmark – April 2026 Meetup
    • Workplace Ninja User Group Denmark March 2026 Meetup
    • Workplace Ninja User Group Denmark February 2026 Meetup
    • Successful Adoption of a “Cloud First” Strategy
    • Speaking at Nordic Virtual Summit
    • Workplace Ninja User Group Denmark February Meetup
    • Workplace Ninja User Group Denmark Meetup – May 2022
    • Workplace Ninja User Group Denmark Meetup – April 2022
    RONNIPEDERSEN.COM
    • Home
    • Enterprise Mobility
      • Configuration Manager
      • Identity and Access
      • Information Protection
      • Intune
    • Cloud and Data Center
      • Data Center Management
      • Group Policy
      • Enterprise Security
      • Hyper-V
      • PowerShell
    • Guides
    • Webcasts
    • Links
    • About
      • Contact me
      • Disclaimer
    RONNIPEDERSEN.COM
    You are at:Home»Enterprise Mobility»Configuration Manager»SCCM 1802: Migrating CMG from Classic to Azure Resource Manager

    SCCM 1802: Migrating CMG from Classic to Azure Resource Manager

    2
    By Ronni Pedersen on March 27, 2018 Configuration Manager, Enterprise Mobility, Intune

    Introduction

    The Cloud Management Gateway (CMG) feature was first introduced in version 1610 as a pre-release feature. Last week Microsoft released 1802, and this feature is no longer a pre-release feature. We also now have the option to create the CMG using Azure Resource Manager (ARM).

    In this blogpost I will share some learnings that I got from migrating the first customer from an existing  (Classic) CMG deployment to the new modern (ARM) deployment.

    Pre-Migration Tasks

    There is really not that much that needs to be prepared, but you should spend the 15-20 minutes it takes to read the following documentation before you start:

    • Plan for the cloud management gateway in Configuration Manager
      https://docs.microsoft.com/en-us/sccm/core/clients/manage/cmg/plan-cloud-management-gateway
    • Security and privacy for the cloud management gateway
      https://docs.microsoft.com/en-us/sccm/core/clients/manage/cmg/security-and-privacy-for-cloud-management-gateway
    • Certificates for the cloud management gateway
      https://docs.microsoft.com/en-us/sccm/core/clients/manage/cmg/certificates-for-cloud-management-gateway
    • Set up cloud management gateway for Configuration Manager
      https://docs.microsoft.com/en-us/sccm/core/clients/manage/cmg/setup-cloud-management-gateway

    Certificates

    Clients must trust the CMG server authentication certificate. There are two methods to accomplish this trust:

    • Use a certificate from a public and globally trusted certificate provider.
    • Use a certificate issued by an enterprise CA from your public key infrastructure (PKI).

    Note: The CMG server authentication certificate now supports wildcards. Some organizations use wildcard certificates to simplify their PKI and reduce maintenance costs.

    This specific customer has a PKI, so we will use a server authentication certificate issued from the internal enterprise PKI.

    When requesting the custom web server certificate, provide an FQDN for the certificate’s common name. It’s important that the name that ends with cloudapp.net.

    The name must be unique, and you can use nslookup to see if your preferred DNS name is available.

    SNAGHTML1a6d37ff

    You also need an exported Root CA, and from all your Sub CA’s. Most customers have 2 Sub CA’s but In this scenario we have 4, as the customer is upgrading the PKI infrastructure.
    Some clients are using the old, some are using the new, so we need all of them.

    SNAGHTML1a7a2ad0

    Configure Azure services

    Integration with Azure AD is also required (Azure AD user discovery is not required).

    To setup this service, you need to have Azure AD Admin Credentials.

    Launch the console and navigate to Administration / Overview / Cloud Services / Azure Services.

    SNAGHTML1a8886f6

    Add New, and select Cloud Management.

    SNAGHTML1a8a967d

    Create the two required Applications, by following the wizard. If you don’t have Azure AD admin rights, you can also get someone to create them directly in AAD. This also allows you to extend the lifetime of the secret key.

    The name and the URL are not really important, but it might be a good ideas to discuss the naming standard with the Azure team, before you move on.

    SNAGHTML1a8d3786[4]

    You don’t need to enable User Discovery.

    SNAGHTML1a906195

    That’s it… All pre-requirements are now completed.

    Set up cloud management gateway

    Running the CMG setup wizard is pretty easy, if all the pre-requirements are completed.

    The only thing you need to verify, is that you needs to be Subscription owner in order to grant the Azure AD App contributor the subscription.

    If you don’t have that permission, you will get the following error:

    SNAGHTML1a96ce0d

    When you have the right permissions, the final part is pretty easy…
    Click Browse, and add the Web server certificate.

    Don’t forget to select the correct Region, before you click Next.

    SNAGHTML1a9bc9b0

    To add the Root CA and the Sub CA certificates, click Certificates, and select the correct Certificate Store.

    SNAGHTML1a9e81fa

    Post-Configuration Tasks

    After installing the new CMG, you can see both of them in the console.

    We don’t need the old one, so it’s safe to delete that now.

    SNAGHTML1aa301f4

    When I deleted the the old CMG, I was expecting to see clients starting to communicate with the new CMG, but that didn’t happen.
    I when through the logs (CloudMgr.log and CMGSetup.log), but I didn’t see anything that could help me in the right direction (Maybe I was just blind).

    It wasn’t until I rand the following SQL query, that I got hint. There was nothing there.

    SNAGHTML1aaa7c04

    After checking the Site Role, I found the problem.
    When you setup CMG for the first time, you add the CMG Role, and the CMG is specified.
    But when you add a new CMG, and use a new name (Like I did in this case), you need to come back and update that setting to the new CMG.

    SNAGHTML1aac255f

    After that everything started to work as expected…

    SNAGHTML1ad6d171

    Conclusion

    Migrating the CMG from Classic to ARM, is pretty easy, and is highly recommended.

    Go migrate, enable co-management and “flip the switch” Smile

    /Enjoy

    +Ronni Pedersen

    • Tweet
    • Share 0
    • +1
    • LinkedIn 0

    Related

    Ronni Pedersen
    • Website
    • Facebook
    • X (Twitter)
    • LinkedIn

    My name is Ronni Pedersen and I'm currently working as a Cloud Architect at APENTO in Denmark. My primary focus is Enterprise Client Management solutions, based on technologies like AzureAD, Intune, EMS and System Center Configuration Manager. I'm is also a Microsoft Certified Trainer and Microsoft MVP in Enterprise Mobility.

    Related Posts

    Speaking at Nordic Virtual Summit

    Workplace Ninja User Group Denmark February Meetup

    Speaking at Modern Endpoint Management Summit 2022

    2 Comments

    1. Travis on June 3, 2019 16:23

      Have you ever encountered the error “error ocurred granting contributor permission to azure app for resource group XXXX”? The account that Im using to try to create the Cloud Management gateway is a subscription owner, Im selecting all the appropriate certificates, and my SCCM applications are present in Azure and found by the wizard. I dont know what Im missing here but something must not be setup in my Azure subscription or something. I am attempting this process in ConfigMgr current branch 1902.

      Reply
    2. Oleksii on August 31, 2021 11:20

      Do you know is it possible to move CMG between Azure Subscription within the same Azure AD tenant?

      Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Follow
    APENTO

    Follow APENTO here:

    Subscribe to Blog via Email

    Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    About
    My name i s Ronni Pedersen and I'm currently working as a Cloud Architect at APENTO in Denmark. My primary focus is Endpoint Management and Security, based on Microsoft technologies. I'm also a Microsoft Certified Trainer and a dual Microsoft MVP in both Security and Windows.
    Recent Posts
    • Workplace Ninja User Group Denmark – April 2026 Meetup
    • Workplace Ninja User Group Denmark March 2026 Meetup
    • Workplace Ninja User Group Denmark February 2026 Meetup
    • Successful Adoption of a “Cloud First” Strategy
    • Speaking at Nordic Virtual Summit
    Archives
    TOP POSTS
    • SCCM 2012 R2: Where is the SMSTS.log located?
    • Missing “UserType” attribute in Azure AD
    • Find the TimeZoneName for your SCCM/MDT Deployments
    • Windows Vista Pre-Build VHD available for download
    • HOW-TO: Sequence applications using App-V 5 for SCCM 2012
    RECENT COMMENTS
    • cOSHi on Missing “UserType” attribute in Azure AD
    • Gus on Pro Tip: Use Ctrl+Alt+D from the Azure Portal to get performance information
    • Sebi on Prepare for Co-Management: Migrate Intune Devices without user affinity
    • Vadim P on SCCM: Failed to Get Client Identity (80004005)
    • TM on Active Directory Based Activation in an multi domain environment
    DISCLAIMER
    The content on this website is presented "as-is" with no guarantees. The use of scripts from this website is at your own risk. Always test before putting something in production! Opinions expressed are my own.
    © 2026 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.