This will be a quick post to show you how to fix MDM logs collection error 0x800700a1. This error usually occurs when collecting MDM logs from an Intune-managed Windows device using the built-in diagnostic tool (mdmdiagnosticstool.exe
) or via Intune Collect diagnostics option.
The exact error code 0x800700a1
message reads: Failed to collect logs. HResult:0x800700a1, areaName:Autopilot, compressedOutFilePath:<Log file path>. This means the tool is trying to save logs to a directory path that is either invalid, unavailable, or a user does not have permission at the given log path location.
One of the scenarios will be when you are gathering Autopilot or Intune logs locally using mdmdiagnosticstool.exe tool, you try to save the logs directly in the system drive (e.g. C:\). If a user does not have permission to write directly at that location, they will see 0x800700a1 error code and logs will not be saved.
For collecting device enrollment and device provisioning autopilot logs, you can open command prompt as an administrator and execute below command. This should work fine as we are saving the logs in C:\Temp location rather than directly in C:\ drive. You can provide any other path as well where you have permission to write and save the logs (for example, documents or downloads folder)
Collect MDM Diagnostic logs [Saving in C:\Temp, should work fine]
mdmdiagnosticstool.exe -area DeviceEnrollment;DeviceProvisioning;Autopilot -zip C:\Temp\MDMDiagReport.zip
If you run below command, it may result in error code 0x800700a1 [Saving directly in C:\ drive]
MdmDiagnosticsTool.exe -area Autopilot -cab C:\MDMAutopilotLogs.cab
Error 0x800700a1
C:\Users\Jatin.AzureAD>MdmDiagnosticsTool.exe -area Autopilot -cab C:\MDMAutopilotLogs.cab
Collecting Wifi Session information. This may take up to two minutes...
Collecting licensing information. This may take up to one minute...
Collecting hardware hash information.
Collecting diagnostics information. This may take up to one minute...
Failed to collect logs. HResult:0x800700a1, areaName:Autopilot, compressedOutFilePath:C:\MDMAutopilotLogs.cab
Collect Autopilot logs and saves it in C:\Temp\Autopilot_Logs.cab location [Works fine as we are saving logs in C:\Temp]
MdmDiagnosticsTool.exe -area Autopilot -cab C:\Temp\Autopilot_Logs.cab
Succeeded to CollectLog at: C:\Temp\Autopilot_Logs.cab
C:\Users\Jatin.AzureAD>MdmDiagnosticsTool.exe -area Autopilot -cab C:\Temp\Autopilot_Logs.cab
Collecting Wifi Session information. This may take up to two minutes...
Collecting licensing information. This may take up to one minute...
Collecting hardware hash information.
Collecting diagnostics information. This may take up to one minute...
Succeeded to CollectLog at: C:\Temp\Autopilot_Logs.cab
C:\Users\Jatin.AzureAD>