The SCCM Cloud Management Gateway was one of the most installed system roles in the past months due to the COVID pandemic. Many organizations wanted to continue managing SCCM clients over the internet during this massive work from the home period. We’ve set up a lot of CMG and now we are getting more and more demand to replace an expired Server Certificate. In this post we’ll show you how to monitor an expired certificate and mostly shows you how to replace your server certificate with a valid one on your SCCM CMG Server.
The server certificate should be provided from a public provider (DigiCert, GoDaddy…), or from an internal public key infrastructure (PKI).
In an ideal world, you should replace the certificate before it expires. If the certificate is forgotten and not replaced before it expires, SCCM will keep working but the clients that are internet managed through the CMG will loose their connection.
On an internet client, you can see that the connection is broken by looking at the CcmMessaging.log file located in C:\Windows\CCM\Logs directory.
You see an error : WINHTTP_CALLBACK_STATUS_FLAG_CERT_DATE_INVALID. This should ring a bell CERT_DATE_INVALID.

Following Microsoft documentation :
| WINHTTP_CALLBACK_STATUS_FLAG_CERT_DATE_INVALID | SSL certificate date that was received from the server is bad. The certificate is expired. |
On the server side, you’ll see error in the CloudMgr.log located in your SCCM Installation Directory \ Logs
ERROR : Management Certificate for service YOURCMGNAME is in expired state. Expiry date-time XXXX
ERROR : Service Certificate is Expired for service YOURCMGNAME

Good, we know that our CMG Server Certificate is expired. So how do we renew the CMG server certificate in the SCCM Console ? Keep reading.
It’s quite easy to renew the certificate in the SCCM console but we’ve seen some cases where extra steps were required in the Azure portal. Let see the simple and easy way :




At this point, if you are lucky enough and everything is fine, the next section is not for you. You can stop reading here.
We’ve seen some cases where doing the above was not enough to renew the SCCM CMG server certificate. After applying the above, the CMG was still in an Error state.
In the CloudMgr.log file, we saw the following error.
ERROR: TaskManager: Task [UpdateServiceConfigurationTask: Service YOURCMG] has failed. Exception Hyak.Common.CloudException, ChangeDeploymentConfigurationOperationFailed: The Change Deployment Configuration operation failed for the domain ‘YOURCMG’ in the deployment slot ‘Production’ with the name ‘YOURCMG-deployment’: ‘The certificate with thumbprint 2e6acfdxxxxxx22a49xxxxxxxfdd0804 was not found.’..

The certificate with thumbprint was not found… interesting.
So I decided to launch the Azure portal to see the certificate there :






We hope this post was useful, please leave your comment or question below.
Please fill out the form, and one of our representatives will contact you in Less Than 24 Hours. We are open from Monday to Friday.
Thank you for subscribing to our newsletter or requesting a quote. You will receive our next month's newsletter. If you have requested a quote, we will get in touch with you as soon as possible.
Something went wrong!
Thank for your reply!