Hi Owen,
The 404/405 you get in the browser is actually useful: it shows that DNS and basic HTTPS reach the endpoint. But the browser and the agent don't connect the same way. The agent registers through .NET with its own proxy and TLS settings, and it also has to complete a certificate exchange, so "no endpoint listening" usually means something on the way is blocking or changing that specific call. I'd work through these in order:
- TLS inspection (most common cause) If a firewall or proxy decrypts HTTPS traffic, registration fails because the certificate exchange breaks. Ask your network team to exclude
*.msappproxy.netand*.servicebus.windows.netfrom any TLS inspection or certificate substitution. A quick check: open the 404 page in the browser and look at the certificate issuer. If it's your firewall instead of a public Microsoft CA, inspection is active. - Outbound proxy If you go through a proxy, the agent doesn't use the browser's settings. Add a
<defaultProxy>section toC:\Program Files\Microsoft Azure AD Connect Provisioning Agent\AADConnectProvisioningAgent.exe.config, then run the wizard again. - Ports and endpoints Make sure port 443 is open to
*.msappproxy.netand*.servicebus.windows.net, and port 80 is open for certificate revocation (CRL) checks, since the agent needs port 80 during registration. - TLS 1.2 for .NET Set
SchUseStrongCryptoandSystemDefaultTlsVersionsto1(DWORD) underHKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319and the matchingWOW6432Nodepath, then restart the server.
Where to look for the real error: Check the trace logs in C:\ProgramData\Microsoft\Azure AD Connect Provisioning Agent\Trace straight after a failed attempt. If it's still unclear, the AADCloudSyncTools PowerShell module can export a full log bundle, and a network trace (Fiddler or netsh trace) will show whether the connection is being reset, sent through a proxy, or given the wrong certificate.
I hope the response provided some helpful insight. If you find this answer useful, please hit “accept answer” so I know it addressed your concern.
Jason