Collecting Diagnostics from a Windows Device in Intune and Reading What Comes Back
How do you pull logs from a Windows device in Intune? Run Collect diagnostics, follow Device diagnostics, then read dsregcmd, MDM and IME logs in the zip.

Advertising disclosure: this article includes partner links. KBY may earn a commission if you sign up or buy through one, at no extra cost to you. How we make money.
Before you begin
- A lab or test Microsoft Intune tenant, or a test group in a tenant you are allowed to practise in.
- One corporate-owned Windows 11 device, or Windows 10 version 1909 or later, enrolled in that tenant and switched on.
- An account with the Help Desk Operator or School Administrator role, or a custom role with Remote tasks/Collect diagnostics and read access to managed devices.
Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.
To collect diagnostics from a Windows device in Microsoft Intune, open the device under Devices then All devices in the Intune admin center, select Collect diagnostics, then confirm with Collect data. Follow progress under Monitor then Device diagnostics, and when the action completes, use the … menu on its row to download a zip of registry keys, command output, event logs and log files. The constraint to plan around is the device: it must be corporate-owned, online and able to reach Intune’s regional upload storage. If it doesn’t receive the action within 24 hours, the collection fails.
The action exists so you can look inside a managed device without remote control and without interrupting the person using it. Intune runs a fixed list of collectors on the device, uploads the results and keeps them for 28 days. This guide explains what happens between your click and the zip, who is allowed to start it, what the zip contains and which files answer which questions. You then run the action against a lab device, check its output against what the device reports about itself, and clean up afterwards.
#By the end you will be able to
- Describe the path a diagnostics request takes from the Intune admin center to the device and back.
- Name the Intune roles that can run Collect diagnostics and the permission a custom role needs.
- Run the action on a Windows device, follow its status and download the result.
- Find the
dsregcmd /statusoutput, the MDM diagnostics and the event logs in the zip, and say what each one tells you. - Decide when a collection is worth running, and when a failed one points to the device rather than to Intune.
#What you need before you collect anything
- A lab or test Microsoft Intune tenant, or a test group in a tenant you are allowed to practise in.
- One corporate-owned Windows 11 device, or Windows 10 version 1909 or later, enrolled in that tenant and switched on.
- An account with the Help Desk Operator or School Administrator role, or a custom role that includes Remote tasks/Collect diagnostics together with read access to managed devices.
- Local access to the lab device, so you can compare the collected output with what the device shows directly.
- Somewhere protected to keep the zip while you read it, because it can contain user and device names.
#What the action does and where the data goes
#From a click to a zip file
Intune doesn’t pull files from a device directly. When you choose Collect diagnostics, the service queues a device action. The device picks it up the next time it talks to Intune, runs the collection locally, and uploads the results to Azure blob storage in your tenant’s region. Microsoft publishes the list of upload URLs per region (Americas, Europe, Switzerland, East Asia, India and Australia). You can find your tenant’s geography under Tenant administration then Tenant status. If a firewall or proxy blocks your region’s URLs, the device gathers the data but can’t hand it over. Once the upload lands, the collection appears under Monitor then Device diagnostics, ready to download.
Two of those details shape how you use it. The device has to be online and receive the action within 24 hours, or the request fails. Microsoft also lists a known time-out on devices that lack KB4601315 or KB4601319, which contain a fix to the DiagnosticLog CSP that prevents a time-out during upload, and those devices need a restart after the update. A failed collection is therefore often evidence in itself: it tells you the device isn’t checking in or can’t reach the upload storage.
Rendering diagram...
The diagram shows the two places a Windows diagnostics collection usually stops. The first is whether the device is checking in at all, and the second is whether it can reach the regional upload storage.

#Who is allowed to run it
Collecting diagnostics is a remote task, so it sits with the roles that act on devices rather than the ones that only read them. The built-in Help Desk Operator and School Administrator roles include it. A custom role needs the Remote tasks/Collect diagnostics permission plus permissions that let the account see managed devices, such as Organization/Read and Managed devices/Read. The built-in Read Only Operator role views devices but can’t make changes, and it doesn’t include Collect diagnostics. This matters in practice: if the button is missing for a junior colleague, check their role before assuming the device is unsupported.
The action is turned on for every tenant by default. An administrator can switch it off under Tenant administration then Device diagnostics, using the control labelled for corporate-managed devices running Windows 10, version 1909 and later, or Windows 11. The same page has a separate control for automatic collection when Windows Autopilot fails, which is also on by default. Don’t change either while you practise; the exercise below only reads them.
#What lands in the zip
Each Windows collection follows a fixed list in four groups: registry keys, commands, Event Viewer logs and files. On Windows 10 with KB5011543, or Windows 11 with KB5011563, the zip uses a flattened structure, with each item named after the data collected and a folder created where several files come back. The parts a junior administrator reaches for first are:
dsregcmd /status, which shows whether the device is Microsoft Entra joined, hybrid joined or domain joined, and whether its record in Entra ID is healthy.mdmdiagnosticstool.exeoutput, saved as anmdmlogscab file, which holds the MDM enrolment and policy picture.ipconfig /allandnetsh winhttp show proxy, for network questions when a device can’t reach Intune.- The Intune Management Extension logs from
%ProgramData%\Microsoft\IntuneManagementExtension\Logs. - Event logs including Application, System, Setup, BitLocker Management and Windows Hello for Business.
- Registry keys such as
HKLM\SOFTWARE\Microsoft\IntuneManagementExtensionand the installed-programsUninstallkeys.
Microsoft states that only non-user locations and file types are accessed. Even so, the output can include identifiable information such as a user or device name, and Microsoft personnel might access it to help troubleshoot and resolve incidents. Treat the zip as you would any support log that names a person.
#An example in practice: a laptop that stopped reporting
Suppose a user’s laptop shows a last check-in several days old, and new policy isn’t arriving. Remote control is awkward because the user is travelling. A collection is a reasonable first move, and the way it behaves tells you something before you open a single file.
If the collection fails after 24 hours, the device most likely isn’t receiving actions at all. Check whether it is online and patched, and look at how widespread the problem is. The script that lists Intune devices that haven’t synced in a set number of days shows whether this laptop is alone or part of a pattern. If the collection succeeds, the device can talk to Intune and reach the upload storage, and the zip narrows the cause.
Say the zip’s dsregcmd /status output shows AzureAdJoined : YES but DeviceAuthStatus : FAILED. Device is either disabled or deleted. Microsoft documents that value as meaning the device object is disabled or deleted in Microsoft Entra ID. The field exists on Windows 10 version 21H1 and later, so an older device won’t show it. That points away from the laptop and towards a directory change, such as an overenthusiastic stale-device clean-up. The right next step is to find out who changed the device record and why, not to reinstall anything on the laptop. The guide to tracing an endpoint management problem in Intune shows how to follow that kind of lead from one piece of evidence to the next.
Notice the reasoning. The collection result, failed or succeeded, ruled out a whole class of causes. One line from one file then moved the investigation from the device to the directory. You didn’t need every file in the zip.
#Try it on a lab device
The goal is to run one collection, read three parts of it, and confirm they agree with what the device reports locally. Nothing on the device is reconfigured. The action does create a stored collection, which Intune deletes after 28 days, and you will download a file you need to delete yourself.
- Take a baseline on the device. Signed in to the lab device with your work account, not a local administrator account, open a command prompt and run
dsregcmd /status. Write downAzureAdJoined,DomainJoined,DeviceIdandDeviceAuthStatus, and whether the Tenant Details section shows anMdmUrl. This changes nothing. - Read the tenant setting. In the Intune admin center, open Tenant administration then Device diagnostics and confirm the control for corporate-managed Windows devices is enabled. If it is disabled, stop and ask the tenant owner; don’t enable it yourself in a shared tenant.
- Start the collection. Go to Devices then All devices, select the lab device, choose Collect diagnostics from the row of actions at the top of the overview, and confirm with Collect data. A pending notification should appear on the device’s Overview page.
- Follow it. Open Monitor then Device diagnostics and find your request. Keep the device switched on and connected while you wait.
- Download it. When the action completes, select … on its row, then Download, then Yes. Save the zip to the protected folder you prepared.
- Read three parts. Open the
dsregcmd /statusoutput and compare the Device State and Device Details sections with your baseline. Open the Intune Management Extension log folder and note the most recent timestamp. Open the System event log and note the time of the last restart. - Clean up. Delete the zip and any extracted files from your computer when you have finished. The stored collection in Intune needs no action; it is deleted after 28 days.
Following along? Tap a step’s number to tick it off.
Stop if the device turns out to be personally owned, if it isn’t the lab device you meant to select, or if the request is still pending after 24 hours. A request that old has failed, and the next step is to check the device’s connection and patches, not to send a second one.

#Check your work against the device itself
The exercise passes when the collected DeviceId and join state match the baseline you took by hand, and DeviceAuthStatus reads SUCCESS. Matching values show you downloaded the right device’s collection and that the device’s record in Entra ID is healthy. A mismatch in DeviceId means you have the wrong device, or the device was re-registered between your two readings, and both are worth knowing.
Expect the User State section to differ. Microsoft notes that dsregcmd /status must run in a user context to give a valid user status. The documentation doesn’t say which account the collection runs under, so treat a different or empty User State in the zip as unproven, not as a fault. Compare it with your own baseline instead.
You can also confirm the MDM side without Intune at all. On the device, open Settings then Accounts then Access work or school, select the work account, select Info, then Create report and Export. The report is written to C:\Users\Public\Documents\MDMDiagnostics. The same tool runs from the command line, and the zip it writes includes MDMDiagHtmlReport.html, a summary of the management URL, the MDM server’s device ID, certificates and policies:
1mdmdiagnosticstool.exe -area "DeviceEnrollment;DeviceProvisioning;Autopilot" -zip "c:\users\public\documents\MDMDiagReport.zip"If the local report and the collected cab tell the same story, your reading of the zip is sound. Delete the local report afterwards too.
#Pitfalls that waste a collection
- Sending a second request to a silent device. If the first one hasn’t been picked up, a second won’t be either. Fix the check-in first.
- Collecting from a personally owned Windows device. On Windows the action supports corporate-owned devices, so a personally owned one isn’t a candidate.
- Blocking the upload. A collection can run on the device and still fail to upload if your region’s storage URLs are blocked. Check them against Microsoft’s list for your tenant’s geography.
- Scripting it through Graph. Microsoft states that diagnostics can’t be collected or downloaded by calling Microsoft Graph directly. Use the admin center.
- Keeping zips forever. Each device can hold up to 10 stored collections, and the downloaded copies on your own disk are yours to protect and delete.
- Reading everything. Start from the question you have. Join state lives in
dsregcmd, enrolment and policy in the MDM logs, and app and script deployment in the Intune Management Extension logs.
#Worth remembering
- Collect diagnostics works on corporate-owned Windows devices that are online and receive the action within 24 hours.
- Help Desk Operator and School Administrator can run it; Read Only Operator can’t.
- Whether the collection fails or succeeds is evidence before you open the zip.
DeviceAuthStatusin the collecteddsregcmd /statusshows whether the device’s Entra ID record is healthy.- Collections are kept for 28 days; your downloads are your responsibility.
#Collecting from devices in a production context
Before you run the action on a real user’s device, check three things: that your role allows it, that the device is corporate-owned and recently checked in, and that your region’s upload URLs are open. Tell the user if your organisation’s policy requires it. The collection won’t interrupt them, but it gathers data that can identify them, and Microsoft personnel might access it to help resolve incidents.
For several devices at once, Collect diagnostics is also available as a bulk device action for up to 25 Windows devices at a time. Use it when a pattern is already clear, not as a first sweep. For Windows Autopilot failures you often don’t need to start anything: automatic capture is on by default and keeps one set of logs per device per day, which you can download from the device’s Diagnostics action. Turning device diagnostics off for the tenant is a privacy decision for the tenant owner, not a troubleshooting step, and needs their agreement. When a collection points to something you can’t change, such as a deleted directory object or blocked network storage, hand it to the team that owns that system with the zip’s relevant lines attached rather than the whole file.
About this page
Credited to
Dates
Published
Sources
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Recommended reading
More from KBY that goes with this article.
- Microsoft Intune error
0x80180014: your organization does not support this version of Windows
2 min read

Related articles
Endpoint and Device Management
Decommissioning Windows Devices in Intune: Retire, Wipe, Cleanup
Decide between Retire and Wipe for a Windows device in Intune, then remove the Autopilot identity and hybrid AD object in order so re-enrolment does not fail.
ReadEnterprise IT Management
Part 4: Configure the Intune Enrollment Status Page for Autopilot: Blocking Apps and Timeout
A custom ESP profile on the Autopilot device group, a short Win32 blocking list, quality updates on, and a 90-minute time-out chosen for a reason.
ReadArtificial Intelligence
Anthropic’s Claude Ship Can Now Approve Pull Requests: What Teams Should Check First
Anthropic's new Claude Ship reviews, fixes and can approve pull requests under a policy file. What it does, what it costs, and the checks before you switch it on.
ReadDiscover more
Graduate Learning
Ops Playbook
- PlaybookInstall the Configuration Manager Client During Windows Autopilot With Intune Co-Management Settings
- PlaybookMigrate Group Policy to Intune With Group Policy Analytics Before Moving Autopilot to Entra Join
- PlaybookSet Up Windows Autopilot Device Preparation With Enrollment Time Grouping in Intune
- PlaybookConfigure the Autopilot Enrollment Status Page to Block Desktop Use Until Required Apps Install
Lexicon Definitions
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Build practical engineering skills.
Receive new lessons, learning paths, practical exercises and early-career guidance.
Comments
Add a thoughtful note on Collecting Diagnostics from a Windows Device in Intune and Reading What Comes Back. Comments are checked for spam and held for moderation before appearing.