To fix the Windows Autopilot import error when importing a .csv file into Intune, you should first check for common issues that may cause the error. Here are some steps you can follow:
- Check for Existing Device Records: Ensure that the device you are trying to import is not already registered in your tenant. If it is, you will need to delete the existing record from Microsoft Intune before importing the new .csv file.
- To do this, sign in to the Microsoft Intune admin center, navigate to Devices > Windows > Windows enrollment > Devices (under Windows Autopilot Deployment Program), select the devices you want to delete, and then click Delete.
- Verify the .csv File Format: Make sure that the .csv file has not been edited in Microsoft Excel or any other editor that might introduce extra characters. It's best to use Notepad or a similar text editor to ensure the file format remains valid.
- Check for Errors in the .csv File: If the import fails, the error message may indicate specific lines in the .csv file that are causing the issue. Review those lines for any discrepancies or formatting issues.
- Use the Correct PowerShell Script: If you haven't already, use the Get-WindowsAutoPilotInfo PowerShell script to generate the .csv file correctly. This script ensures that the necessary device information is included in the right format.
- Gather Logs if Necessary: If the issue persists, you may need to collect diagnostic logs to provide more information for troubleshooting. You can run the command
Mdmdiagnosticstool.exe -area Autopilot -cab c:\out.cabto collect relevant logs.
If after following these steps you still encounter issues, you might need to contact Microsoft Support for further assistance.