I was working with a new customer recently and they pointed out that they were having a problem with NDES.
What is NDES? The Network Device Enrollment Service (NDES) is one of the role services of Active Directory Certificate Services (AD CS). NDES acts as a Registration Authority to enable devices running without domain credentials to get certificates from the internal Certificate Authority, based on the Simple Certificate Enrollment Protocol (SCEP).
Therefore the customer was unable to issue SCEP certificates via Intune and was unable to enforce 802.1x authentication to their network.
An Intune managed Windows 10/11 client was a good place to start, in particular the event logs (Applications and Services Logs > Microsoft > Windows > DeviceManagement-Enterprise-Diagnostic-Provider > Admin). Event IDs 307 and 32 were repeating.
Event ID 307 - SCEP: FailedLogError Message : (SCEPInstallCertificateWithScepHelper:Failed to Initialize SCEP enrollment with NDES Server https://xxxxx.msappproxy.net/certsrv/mscep/mscep.dll/pkiclient , CA Cert thumbprint 'xxxx' and server certs)
Event ID 32 - SCEP: Certificate enroll failed. Result: (Internal server error (500)).
Just for kicks I opened a browser and navigated to the NDES server URL (from event ID 307). It gave me the same Internal Server Error (500) that I could see in event ID 32.
Next I had a look on the NDES server. The IIS log files can be found in the following folder: %SystemDrive%\inetpub\logs\logfiles\w3svc1. On 10th August we could see a status code of 200: This status indicates the connection with the NDES server is successful.
On 11th August we could see a status code of 500. This Microsoft troubleshooting guide tells me that Status code of 500 could mean that the IIS_IUSRS group might lack correct permissions (Impersonate a client after authentication).
Event ID 2: The Network Device Enrollment Service cannot be started (0x80070057). The parameter is incorrect.
This prompted me to look at the computer certificates on the NDES server. Sure enough, they had expired. There were three certificates to deal with:
- Certificate based on the CEP Encryption certificate template
- Certificate based on the Exchange Enrollment Agent (Offline Request) certificate template
- Certificate based on the NDES SSL certificate template