HomeNewsletterCommunityToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog

Cloud Management Gateway: Why "Not Connected to CMG" Almost Always Means a Certificate, Not a Server

IA
Imran Awan
23 July 2026

A sales rep goes fully remote for six weeks — no VPN, no office visits, home Wi-Fi and airport lounges. Compliance policy stops evaluating. Software Center stops showing new deployments. Endpoint protection definitions go stale. Back at head office, the CMG dashboard looks perfectly healthy: the service is running, the connection point shows green, traffic graphs are flowing for everyone else. But this one device — and a growing list of others — just isn't checking in. The console calls it "not connected to CMG," and that phrase tells you almost nothing about where the problem actually is.

This post explains what a Cloud Management Gateway actually does, which components have to work together for it to function, and why — in the overwhelming majority of real cases — a healthy-looking CMG deployment with a disconnected client comes down to a certificate trust problem or a CRL/OCSP reachability issue on the client's network, not a fault in the gateway itself.

The problem

Cloud Management Gateway (CMG) exists to solve one specific problem: Configuration Manager was built for devices sitting on a corporate network, and modern devices don't sit on corporate networks anymore. CMG lets ConfigMgr-managed devices check in and get policy, content, and inventory collection from the internet, without a VPN, by routing that traffic through an Azure-hosted gateway back to your on-premises site.

When it's working, an internet-based client behaves almost identically to one sitting in the office — it gets machine policy, downloads applications and updates, submits inventory, and shows up in the console as an online client. When it stops working, the symptom is rarely a crash or an error dialog. It's silence: no new policy, no new deployments, no fresh inventory, and eventually a device that looks stale or noncompliant in Intune even though nothing was changed on it.

Warning: "not connected to CMG" in the console or the cloud management dashboard is a status summary, not a diagnosis. It tells you the client hasn't successfully round-tripped a request through the gateway recently. It does not tell you whether the fault is DNS, TLS, a certificate, a CRL, the connection point, or the management point on the other side.

Why it happens

To understand why this fails the way it does, you need to know what's actually sitting between the client and your on-premises site. CMG is not a single thing — it's three coordinated components, per Microsoft's own architecture documentation:

Every one of those pieces has to be correct at the same time for a client to connect successfully. But here's the part that catches people out: the CMG cloud service and CMG connection point are usually the most stable part of the chain. Once deployed, they don't drift. Certificates, by contrast, expire, get reissued with a different chain, or depend on infrastructure — a CRL distribution point, an OCSP responder — that has to be reachable from wherever the client currently is, which for an internet-based device could be anywhere.

Note: if you're using PKI client authentication certificates, the wizard's "Verify Client Certificate Revocation" setting is on by default. Microsoft's own setup guidance states plainly: "A certificate revocation list (CRL) must be publicly published for this verification to work." If a client can't reach that CRL distribution point — or an OCSP responder, depending on your PKI design — from its current network, certificate validation fails, and the client is treated as untrusted even though the certificate itself is perfectly valid.

This is why a device on the corporate LAN and the exact same device tethered to a phone hotspot can behave completely differently. On the LAN, CRL/OCSP endpoints are usually reachable through internal DNS and internal firewall rules. Off the LAN, those same endpoints may sit behind on-premises-only network paths that were never designed to be reachable from the open internet — so the certificate check silently times out or fails, and the client falls back to "can't connect."

Gotcha: if you deploy CMG using Microsoft Entra ID for client authentication instead of PKI certificates, a trusted root certificate isn't required for that identity path — Microsoft Entra ID handles authentication instead. But the CMG server authentication certificate (the one securing the HTTPS endpoint itself) is still mandatory in every deployment model, PKI or Entra ID. A client that doesn't trust the certificate chain behind that server cert will fail to connect regardless of which authentication method you use for client identity.

How to verify

Before assuming the gateway is broken, separate "is the service healthy" from "can this specific client reach and trust it." These are different questions and need different checks.

Start server-side. In the Configuration Manager console, the Cloud Management Gateway node under Administration > Cloud Services shows the deployment status, and the built-in Connection analyzer tool lets you simulate a client connection using either a Microsoft Entra user or a client certificate — a genuinely useful first check, because it tests the service, the connection point, and the path to the management point without needing an actual remote device.

Then check the client itself. Three client-side log files are the ones that actually show what a specific device is doing when it tries to reach management points, software update points, and distribution points — including a CMG:

Tip: these logs live in %WINDIR%\CCM\Logs on the client. Open them in CMTrace (or any tail-capable viewer) rather than Notepad — CMTrace highlights errors and warnings inline, which matters when you're scanning for a single certificate failure buried in routine location-service chatter.
⚠ Error pattern — LocationServices.log
Failed to send HTTP request. Error 0x87d00215, ports 443,443, CRL = true
Failed to determine currently assigned MPs (CLIENT_CERT authentication)
Gotcha: that CRL = true flag in the log line is the whole story. It confirms the client is enforcing certificate revocation checking on this connection attempt. If the revocation status can't be determined — because the CRL endpoint or OCSP responder is unreachable from the client's current network — this call fails exactly the way it would if the certificate itself were invalid, even though nothing is actually wrong with the cert.

On the network side, confirm the client can actually resolve and reach the CMG's public endpoint and any CRL distribution points it depends on. A basic Test-NetConnection against the CMG's HTTPS endpoint on port 443, plus a check that the CRL distribution point URL embedded in the certificate is reachable, tells you whether this is a network path problem before you go anywhere near the ConfigMgr console.

The fix

Work through this in order — server health first, then certificate trust, then network reachability. Don't jump straight to rebuilding the CMG; in the majority of cases the gateway itself is fine.

Configuration Manager Console — Cloud Management Gateway
  1. Go to Administration > Cloud Services > Cloud Management Gateway.
  2. Select the CMG instance and confirm its Status shows Ready/running, not a deployment or error state.
  3. Select the CMG, then choose Connection analyzer in the ribbon.
  4. Choose Client certificate (if you use PKI auth) or Microsoft Entra user (if you use Entra ID auth), authenticate, and select Start.
  5. Review each stage of the result — service reachability, connection point path, and management point response — and note exactly which stage fails, if any.

If the connection analyzer passes cleanly but real clients still can't connect, the fault is almost certainly specific to those clients' network paths or certificates rather than the CMG deployment. Move to the certificate side:

Configuration Manager Console — Primary Site Communication Security
  1. Go to Administration > Site Configuration > Sites.
  2. Select the primary site your internet-based clients are assigned to, then choose Properties.
  3. Switch to the Communication Security tab.
  4. Confirm the client authentication model configured here (PKI client certificate vs. Entra ID vs. token) matches what you expect the failing devices to be using.
  5. If you don't have a publicly reachable CRL, and you're relying on PKI client certificates, disable Clients check the certificate revocation list (CRL) for site systems — but only after confirming with your PKI team that skipping revocation checking is an acceptable risk for your organisation.
Warning: disabling CRL checking removes a real security control — a revoked certificate would no longer be rejected. Only do this as a deliberate, documented decision, not as a quick workaround to make a symptom disappear. The correct long-term fix is almost always making the CRL/OCSP endpoint properly reachable from the internet, not turning the check off.

If CRL/OCSP reachability is the actual root cause — which it is in most "healthy CMG, disconnected client" tickets — the fix is on the PKI and network side, not inside ConfigMgr:

  1. Identify the CRL distribution point URL(s) embedded in the client authentication certificate template.
  2. Confirm that URL is published somewhere reachable from the public internet — an HTTP CDP location, not just an internal CA server share.
  3. If you use OCSP instead of or alongside CRL, confirm the OCSP responder URL is likewise internet-reachable and not blocked by an internal-only firewall rule.
  4. Re-test from an actual internet-based network path (a hotspot, a home connection outside your corporate VPN) — not from inside the office, where internal DNS and firewall rules can mask the exact failure remote users see.

Proof it worked

"It's back in the console" isn't proof — the console can lag behind the client's real state. Confirm on the device itself, and confirm the mechanism (cert/CRL), not just the symptom (device shows online again).

Download the script — GitHub

Test-CMGClientConnectivity.ps1 is free and open source. It's a genuinely read-only script — no writes to Autopilot, Intune, or Entra ID.

Test-CMGClientConnectivity.ps1 View full repo →
PowerShell 7 — run on the affected device
# Run locally on the device that was reported "not connected to CMG" .\Test-CMGClientConnectivity.ps1 -CMGFqdn "contoso.cloudapp.net" -Verbose
Example output below is illustrative, not a live-device capture. It matches the script's real structure and message wording, with a fictional CMG FQDN, so you can see what a run looks like before testing it yourself.
Test-CMGClientConnectivity.ps1 — example output (illustrative)
Target CMG FQDN : contoso.cloudapp.net Log folder : C:\Windows\CCM\Logs Tail lines/log : 200 Run time (UTC) : 2026-07-23 09:41:02Z [FOUND] LocationServices.log: 6 matching line(s) in the last 200 lines. Most recent matches: Failed to determine currently assigned MPs (CLIENT_CERT authentication) [OK] CcmMessaging.log: no CRL/certificate/CMG-related keywords found in the last 200 lines. [FAIL] TCP 443 to 'contoso.cloudapp.net' did not succeed from this device. [SKIPPED] No -CrlUrl supplied. Skip this step if you authenticate clients via Microsoft Entra ID or site-issued tokens. CMG endpoint reachable (TCP 443) : False CMG/certificate keywords found in logs : True This script is read-only. No configuration was changed on this device.
Note: the companion script is read-only. It checks CMG-related client log entries and basic network reachability to the CMG endpoint — it changes nothing on the device, the site, or Azure. Run it before and after any fix so you have an honest before/after comparison rather than assuming the fix worked because a portal refreshed.

A genuinely resolved device should show fresh, successful entries in LocationServices.log and CcmMessaging.log — not just an absence of new errors, but actual new successful management point lookups and policy retrieval timestamped after your fix. If the CRL/OCSP path was the root cause, you should also be able to independently confirm — via a plain network test from that same device and network — that the CRL or OCSP endpoint is now reachable, separate from anything ConfigMgr reports.

References

Companion script — pending publish

Test-CMGClientConnectivity.ps1 is a read-only diagnostic that checks CMG-related client log entries and basic network reachability from the device. It has not yet been pushed to GitHub — it will be linked here once tested and published.

Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Windows 11
Windows 11, Secure Boot, and BitLocker: What Changed in June 2026
A rundown of the Secure Boot and BitLocker changes that landed in the June 2026 cumulative update.
Security
Secure Boot Certificate Expiry: Intune Remediation Scripts for 2026
Detection and remediation scripts for the 2026 Secure Boot certificate expiry, deployed via Intune Proactive Remediations.
PowerShell
Top 20 PowerShell Commands Every Intune and Azure Engineer Should Know
The commands that come up again and again across Intune, Entra ID, and Azure day-to-day work.