Blog Post
The Nightmare of renewing NDES Enrollment Agent Certificates
Why on earth is this information not in the official Microsoft documentation. The certs on my NDES server expired this week, broke the server and I have been wracking my brain trying to figure out how the heck this works. A MS support rep sent me this blog post in lieu of official documentation.
- richardhicksMar 25, 2026Copper Contributor
NDES is rather poorly documented, for sure. :/ Hopefully you got it sorted out. If not, let me know, and I'd be happy to assist. And don't forget, if you go with the autoenrollment option (recommended), you'll need to automate the recycling of the SCEP application pool after the certificate renews. I can help you there, too.
- rmckennaApr 15, 2026Brass Contributor
Hi Richard,
Thanks for your comment. Unfortunately, I tried following these directions but couldn't get it to work. I duplicated the cert templates, made the required changes and unpublished the old ones. On the NDES server, I just removed and re-added the NDES role to get it to request new certs and it failed. I tried a second time but instead I superseded the old templates with the new ones. This automatically re-published the old templates. Presumably because you have to publish templates that you want to be superseded. This time, the NDES role configuration did not fail but it still used the old templates somehow.
I had a feeling this might happen going into this because I asked myself: how does the NDES server know to use the new templates? That wasn't clear from the post.
Any help you're willing to give would be greatly appreciated.
Thanks.
DagmarHeidecker MMVader LegoVader would love to get your input on this as well.
- MMVaderApr 15, 2026MCT
When you install NDES, you cannot point it to use custom cert templates - it will always revert back to the default templates; this is hard coded! After NDES has been installed, you can shift to custom templates. When NDES is starting (or the application pool recycles), it won't look into template information. Instead, the service expect TWO valid certs with the OID 1.3.6.1.4.1.311.20.2.1, which corresponds to “Certificate Request Agent” in the local machine store. Which cert will be used for which purpose will be decided by the key usage ('Digital Signature' for the enrollment agent cert, and 'Encryption' for the CEP encryption cert).
If NDES finds more valid and working certs in the local machine store, it will pick the ones which have been cached (the old ones) except those are not available anymore. In that case it will look for the most recent ones which meet the requirements.