About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A Windows device that is meant to report to Microsoft Defender for Endpoint writes its own event log. Two of the entries in it say the sensor cannot get out to the internet: event 5, "Microsoft Defender for Endpoint service failed to connect to the server at" followed by a URL, and event 15, "Microsoft Defender for Endpoint can't start command channel with URL:" followed by a URL. Until the sensor can reach those servers, the device does not report to the Microsoft Defender portal.
What follows covers what Microsoft says the two events mean, how to prove the connection is the problem, and the connection and proxy fixes the vendor documents. Nothing before the Fix section changes anything.
What the error means
The log in question is Microsoft-Windows-SENSE/Operational. In Event Viewer it sits under Applications and Services Logs > Microsoft > Windows > SENSE, then Operational. SENSE is, in Microsoft's words, "the internal name used to refer to the behavioral sensor that powers Microsoft Defender for Endpoint."
In Microsoft's event table, event 5 reads "Microsoft Defender for Endpoint service failed to connect to the server at variable ." The page says the variable is the URL of the Defender for Endpoint processing servers, and the description is "The service couldn't contact the external processing servers at that URL." The action is "Check the connection to the URL." Event 15 reads "Microsoft Defender for Endpoint can't start command channel with URL: variable ." It has the same variable, the same description and the same action. Both point to "Configure proxy and Internet connectivity" as the next page to read.
The same event numbers exist elsewhere with a different meaning, so name the log before acting. The Application log has an event source called WDATPOnboarding, written by the onboarding script. Microsoft says its event IDs "are specific to the onboarding script only": there, event 5 is "Offboarding data was found but couldn't be deleted" and event 15 is "Failed to start SENSE service". If the event you are looking at is in the SENSE Operational log and carries a URL, it is the event described here. If it is in the Application log from WDATPOnboarding, it is a different event.
Microsoft's onboarding troubleshooting page lists the same two events with a shorter resolution: for event 5 and event 15, "Ensure the device has Internet access". It then adds that the sensor "requires Microsoft Windows HTTP (WinHTTP) to report sensor data and communicate with the Microsoft Defender for Endpoint service", and that WinHTTP "is independent of the Internet browsing proxy settings and other user context applications". So a browser on the same device can open web pages while the sensor cannot connect.
Likely causes
Microsoft does not rank causes for these two events. Its pages point to four places to look:
| Place | What Microsoft says | Where to look |
|---|---|---|
| WinHTTP proxy | WinHTTP is independent of the browser proxy and must be able to detect the proxy servers available in the environment | The device's WinHTTP proxy setting |
| Proxy or firewall rules | Allow the service URLs; "Make sure no firewall or network filtering rules deny access to these URLs" | The proxy and firewall configuration |
| SSL/TLS inspection | For streamlined connectivity, exclude traffic to *.endpoint.security.microsoft.com from SSL/TLS inspection, HTTPS interception and man-in-the-middle proxying; with inspection on, "Defender for Endpoint sensors might fail to communicate with backend services" | The inspection policy on the proxy or firewall |
| Name resolution and IPv4 | "Domain Name System (DNS) resolution is always required"; "Defender for Endpoint requires IPv4 connectivity" | DNS settings and the network's IPv4 path |
The last row comes from two Microsoft pages: the connectivity page for DNS, and the proxy page for IPv4, which says an IPv6-only network needs a transition mechanism such as DNS64/NAT64.
Prove the cause before changing anything
Everything in this section reads settings. The one tool in step 3, the Client Analyzer, writes only its own result files, in the folder specified by HardDrivePath.
Read the event. In the SENSE Operational log, choose Filter Current Log in the Action pane, tick Critical, Warning and Error under Event level, and click OK. Find events 5 and 15 and write down the URL each one carries. Microsoft's event page names the variable as the URL of the processing servers, so the URL is what you test.
Read the WinHTTP proxy the sensor will use. Run this in a command prompt. It prints the current setting and changes nothing:
netsh winhttp show proxy
Microsoft's netsh page lists netsh winhttp show proxy as the command that displays the current WinHTTP proxy settings. Write the result down; the Fix section needs it.
- Test connectivity with Microsoft's Defender for Endpoint Client Analyzer. Microsoft's connectivity page describes it as a tool that checks "that clients are able to connect to the Defender for Endpoint service URLs". Download MDEClientAnalyzer.zip, extract it on the device and, from an elevated command line, run
HardDrivePath\MDEClientAnalyzer.cmdwith your own path in place of HardDrivePath. The tool writes MDEClientAnalyzerResult.zip, and Microsoft tells you to open MDEClientAnalyzerResult.txt. For each URL it prints lines in this form:
Testing URL : https://xxx.microsoft.com/xxx
1 - Default proxy: Succeeded (200)
2 - Proxy auto discovery (WPAD): Succeeded (200)
3 - Proxy disabled: Succeeded (200)
4 - Named proxy: Doesn't exist
5 - Command line proxy: Doesn't exist
Microsoft's reading: if any one of the connectivity options returns a (200) status, the client can communicate with the tested URL using that method. If they all fail, an HTTP error is displayed and the URLs on the connectivity page are what the proxy must allow. The page adds that on a device that is not yet onboarded the tool uses defaults of US, UK and EU unless you run it with -o and the path to the onboarding package.
Microsoft also says the analyzer's cloud connectivity checks are incompatible with the attack surface reduction rule "Block process creations originating from PSExec and WMI commands". The two workarounds it gives are to temporarily disable that rule or to add an exclusion for the analyzer. Both are security-policy changes, so they are a decision for whoever owns the device's security policy, not something to do in passing.
As general advice, not a statement on Microsoft's pages: compare which of the five methods succeeds with what netsh winhttp show proxy printed. A method-1 failure with method-3 success describes a device that reaches the service only when no proxy is involved.
Example (illustrative): a server at contoso.com.au logs event 15 every few minutes, naming a URL. netsh winhttp show proxy reports direct access, while the office browser is configured to use a proxy and opens web pages without trouble. That matches Microsoft's point that WinHTTP is independent of the browser's proxy settings.
Fix
Choose the section that matches the proof. The page for each fix is Microsoft's proxy page, "Configure proxy connectivity for Microsoft Defender for Endpoint on Windows".
Allow the service URLs and stop inspection of Defender traffic
This is Microsoft's description of what the network must do, not a command. Microsoft's pages say the proxy and firewall must allow the Defender for Endpoint service URLs for your environment. For streamlined connectivity, which Microsoft says has been the default onboarding method since 8 May 2024, the consolidated destination is *.endpoint.security.microsoft.com, and traffic to it should not be scanned, inspected, intercepted or passed through a man-in-the-middle proxy. For standard connectivity, Microsoft says to open all URLs where the geography column is WW and the URLs for your own data location, and "Don't exclude *.blob.core.windows.net from network inspection." The connectivity page carries a notice that some of its information relates to a prereleased product, so check the current page for the URL lists. Microsoft's pages give no commands for any firewall or proxy product, so none are given here.
Set a system-wide WinHTTP proxy
Use this only when the proof showed the device needs a proxy and netsh winhttp show proxy shows none, or the wrong one.
Before you change anything, keep the current setting. You already wrote down the result of netsh winhttp show proxy. Microsoft's netsh page also describes netsh winhttp dump as creating "a script containing the current context configuration" that can be saved to a file and used to restore settings if they are altered. Run netsh winhttp dump and keep its output with your note.
Risk: the next command sets a system-wide static WinHTTP proxy. Microsoft says the setting "affects all applications and Windows services that use the default WinHTTP proxy configuration" and suits "devices in a stable network topology". As general advice, a wrong proxy value can stop those other services connecting, so confirm the proxy host and port first.
Run this in an elevated command prompt, replacing the placeholders with your proxy:
netsh winhttp set proxy <proxy>:<port>
Microsoft's example is netsh winhttp set proxy 10.0.0.6:8080. The netsh page also accepts a bypass list written bypass-list=<hosts list>, separated by semicolons.
To undo it: this too changes the WinHTTP proxy for every service that uses the default WinHTTP proxy. If netsh winhttp show proxy earlier reported direct access, run netsh winhttp reset proxy, which Microsoft describes as removing "the current WinHTTP proxy configuration" and returning to direct connectivity. If it earlier reported a proxy, run netsh winhttp set proxy <proxy>:<port> again with the value you wrote down.
Sensor-only proxy through Group Policy
Microsoft documents a separate route for the case where the sensor cannot use automatic discovery or the system-wide WinHTTP proxy: a Group Policy that sets the registry value TelemetryProxyServer, entered as host and port with no spaces, under HKLM\Software\Policies\Microsoft\Windows\DataCollection, together with DisableEnterpriseAuthProxy set to 1. The page says not to deploy TelemetryProxyServer through mobile device management (MDM), because the sensor reads it from the Group Policy registry location. Microsoft's connectivity page, not the proxy page, says that when TelemetryProxyServer is set and Defender for Endpoint fails to access the defined proxy, it falls back to direct connectivity. This is a description of the vendor's method, not a step.
Microsoft Defender Antivirus has its own proxy settings
Microsoft's proxy page says Defender for Endpoint "uses separate proxy settings for the endpoint detection and response (EDR) sensor and Microsoft Defender Antivirus", and Defender Antivirus cloud protection is configured separately. Events 5 and 15 concern the sensor, so setting the Defender Antivirus proxy does not address them.
Confirm the fix
- In the SENSE Operational log, event 4, "Microsoft Defender for Endpoint service contacted the server at" a URL, is listed by Microsoft as a normal operating notification with the note "This URL matches that seen in the Firewall or network activity." Events 5 and 15 stop recurring.
- Run the Client Analyzer again; at least one connectivity option should return (200) for the URLs that failed.
- Check the Devices list in the Microsoft Defender portal. Microsoft's onboarding page says a device that completed onboarding but is absent from the Devices list after an hour points to an onboarding or connectivity problem, so allow that long before judging.
What to watch afterwards
- Proxy or firewall changes. A new inspection policy, a changed proxy address or an updated URL list can bring the events back.
- Event 38, which Microsoft describes as the device being on a metered or paid network and contacting the server at longer intervals. That is a slower reporting rhythm, not a failed connection.
- Devices that move between networks. Microsoft says the system-wide static proxy suits stable topologies.
- The event URL itself, which is the first thing to test each time.
Read next
Related articles you may want next.
- HostingValidating firewall changes for hosted application dependenciesHow to baseline required ports for hosted applications and verify connectivity after routine firewall rule changes—not post-incident policy restore.Read article
- TroubleshootingLet's Encrypt renewal failed: Timeout during connect (likely firewall problem)Certbot renewal fails with Timeout during connect (likely firewall problem). Read the address in the message, test port 80 from outside, fix the cause.Read article
- TroubleshootingConnections drop after a few idle minutes through a firewall or load balancer: idle timers and TCP keepaliveTCP sessions die after the same idle time through a firewall or load balancer. Find the idle timer and set keepalive below it on Linux, nginx or SSH.Read article
Risks and limits
These steps have not been run or lab-tested.
Microsoft's event page gives no version range for events 5 and 15. The text of the events is quoted as the page prints it, including the word "variable" standing in for the URL. The page on onboarding gives a shorter resolution than the event page, and the two are not identical. Microsoft's description of the Client Analyzer states that the tool uses defaults for devices that are not yet onboarded, so a pre-onboarding test is a test of those defaults. The firewall and proxy products that sit between the device and the internet are outside what these pages describe, so the allow-listing step is described and not scripted.
Sources
- Review events and errors using Event Viewer — Microsoft Learn, page dated 2026-07-02, accessed 3 December 2026
- Troubleshoot Microsoft Defender for Endpoint onboarding issues — Microsoft Learn, page dated 2026-03-05, accessed 3 December 2026
- Configure proxy connectivity for Microsoft Defender for Endpoint on Windows — Microsoft Learn, page dated 2026-09-23, accessed 3 December 2026
- STEP 3: Verify client connectivity to Microsoft Defender for Endpoint service URLs — Microsoft Learn, page dated 2026-07-02, accessed 3 December 2026
- Step 1: Configure network connectivity to Microsoft Defender for Endpoint — Microsoft Learn, page dated 2026-09-22, accessed 3 December 2026
- netsh winhttp — Microsoft Learn, page dated 2025-08-20, accessed 3 December 2026
This article was originally published on .