The cloud management gateway (CMG) provides an easy way to manage Configuration Manager clients on the internet. By deploying the CMG as a cloud service in Microsoft Azure, one can manage traditional clients that roam on the internet without additional infrastructure. Also, there is no need to expose on-premises infrastructure to the internet.
Pre-requisites
- Azure subscription (Activate it from MSDN account)
- SCCM environment (1802 or later)
- SCCM MP server has access to Azure services
- Certificate Authority setup, preferably AD CS
- Client Certificate on all machines: required on any computer which will be managed via the CMG. It is also required on the server that will host the Cloud Management Gateway connection point.
Subscription assignment
- Create tenant:
- Home > Create a resource > Azure Active Directory > Create
- Create user:
- Home > (AAD) > Users > New User with Global administrator role
- Re-assign subscription:
- AAD having subscription > Home > Subscription > Overview > Change directory
- Note: It takes some time so please wait for ~10 mins.
- Add new tenant's user as a co-administrator
- New AAD > Subscription > Access control (IAM) > Add co-administrator
Cloud Services Certificate Template
- Create a template of type Web Server
- Certificate Authority > Certificate Templates > Manage > Web Server > Duplicate Template
- General tab: give a name, e.g., CM Cloud Service Certificate. Select Validity and Renewal as per requirement.
- Request handling tab: select 'Allow private key to be exported'
- Security tab: allow 'Read' and 'Enroll' permissions to SCCM servers/group
- Issue the template
- Certificate Authority > Certificate Templates > New > Certificate Template to Issue > Select 'CM Cloud Service Certificate'
CMG certificate creation and export
- Check for the DNS availability
- Home > Cloud Services (Classic) > Add > DNS name (P.S. Just check the availability and do NOT create it at this moment, e.g. nomadlab.cloudapp.net)
- Create a certificate
- Request a new certificate on the CM Site Server with CN and/or DNS as nomadlab.cloudapp.net
- Azure Management Certificate export
- Export above certificate with the private key, all extended properties, and password (nomadlab.cloudapp.net.pfx)
- Export above certificate without the private key (nomadlab.cloudapp.net.cer)
- Export certificate authority certificate
- Export root certificate: Certificates (Local Computer) > Trusted Root Certificate Authorities > Certificates > Export (.CER)
- Export intermediate certificate (if applicable): Certificates (Local Computer) > Intermediate certification Authorities > Certificates > Export (.CER)
Azure Management Certificate
- Upload the certificate to Azure Subscription
- Home > Subscription > Management certificates > Upload > Select the exported certificate (nomadlab.cloudapp.net.cer)
Configure Azure Services
- Create Azure Service
- SCCM console > Administration > Cloud Services > Azure Services > Configure Azure Services
- Web app: Browse > Server App > Create... (e.g. Azure-WebApp) > Sign in... (AAD admin user e.g. administrator@nomadlab.onmicrosoft.com) > OK
- Native Client app: Browse > Client app > Create... (e.g. Azure-ClientApp) > Sign in... (AAD admin user e.g. administrator@nomadlab.onmicrosoft.com) > OK
- Enable Discovery
- SCCM console > Administration > Cloud Services > Azure Services > Configure Azure Services
- App registration
- Azure portal > Azure Active Directory > App registrations
- WebApp > API permissions > Grant admin consent
- ClientApp > API permissions > Grant admin consent
- Run Full Discovery
- SCCM Console > Administration > Cloud Services > Azure Services > Azure Active Directory User Discovery > Run Full Discovery
Resource Providers
- Register resource providers
- Azure portal > Subscriptions > Resource Providers
- Register- Compute, ClassicCompute, Storage, and ClassicStorage
Cloud Management Gateway
- Create Cloud Management Gateway
- SCCM console > Administration > Cloud Services > Cloud Management Gateway > Create Cloud Management Gateway
- General: Azure environment: AzurePublicCloud > Sign In... (AAD admin user e.g. administrator@nomadlab.onmicrosoft.com)
- Settings:
- Certificate file- nomadlab.cloudapp.net.pfx
- Service name, Deployment name, Region, and Resource Group should be auto populated
- Specify security settings- Certificates... > Add exported root certificate (and intermediate certificate if applicable)
- Uncheck "Verify Client Certificate Revocation"
- Once completed, Status would be set to Ready
Site System Role
- Add Cloud management gateway connection point
- SCCM Console > Administration > Site Configuration > Server and Site System Roles
- Site server > Add Site System Roles > System Role Selection > Cloud management gateway connection point > Cloud Management Gateway name and region will be auto-populated
Client Certificate Authentication
- Remove the CRL check
- SCCM Console > Administration > Site Configuration > Sites > Site server > Properties > Communication Security
- Clear "Clients check the certificate revocation list (CRL) for site systems"
Configure roles for CMG Traffic
- Allow Management point
- SCCM Console > Administration > Site Configuration > Server and Site System Roles > Site server > Management point > Properties
- Enable "Allow Configuration Manager cloud management gateway traffic" and select Allow intranet and internet connections
- Allow Software update point
- SCCM Console > Administration > Site Configuration > Server and Site System Roles > Site server > Software update point > Properties
- Enable "Allow Configuration Manager cloud management gateway traffic" and Allow Internet and intranet client connections
- Client Settings
- SCCM Console > Administration > Client Settings > Custom client device settings > Properties
- Client Policy: Enable user policy requests from Internet clients - Yes
- Cloud Services: Allow access to cloud distribution point and Enable clients to use a cloud management gateway - Yes
- SCCM Console > Administration > Client Settings > Custom client user settings > Properties
- Cloud Services: Allow access to cloud distribution point - Yes
- SCCM Console > Administration > Client Settings > Custom client device settings > Properties
- Distribution Point Group
- SCCM Console > Administration > Distribution Point Groups > Properties > Members > Add > Cloud DP
Logs
- Azure AD Discovery Agent (Server): displays the synchronization for users/devices with Azure AD
- \Microsoft Configuration Manager\Logs\SMS_AZUREAD_DISCOVERY_AGENT.log
- Cloud Proxy Connector (Server): details about setting up connections between the CMG service and the CMG connection point
- \Microsoft Configuration Manager\Logs\SMS_CLOUD_PROXYCONNECTOR.log
- Cloud Management (Server): details about deploying the CMG service, ongoing service status, and use data associated with the service.
- \Microsoft Configuration Manager\Logs\CloudMgr.log
- Policy Agent (Client): display requests for policies made by using the Data Transfer Service
- \CCM\Logs\PolicyAgent.log
- Data Transfer (Client): displays all BITS communication for policy or package access
- \CCM\Logs\DataTransferService.log
- Client Location: indicates that the machine is using the internet management point
- \CCM\Logs\ClientLocation.log
Very informative . Thanks for sharing
ReplyDeleteThank you. Let me know in case you struggle in other areas too. I'll try to prepare a doc for that too.
DeleteGreat explanation..
ReplyDeleteThank you Harender. Let me know in case you struggle in other areas too. I'll try to prepare a doc for that too.
DeleteGreat explanation..
ReplyDeleteit is mandatory to have Client Certificate on all machines: required on any computer which will be managed via the CMG. if machines are Azure Ad Joined or Hybrid Azure AD joined still requires Client Certificate ?
ReplyDelete