How to Fix PST Import Fails with Unknown Error in Microsoft 365
Question details
Users experience failures when attempting to import PST files via the Microsoft 365 compliance portal.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Importing PST files through the Microsoft 365 compliance portal for organizational email migration.
- Observed behavior
- The import process fails after a long processing period, throwing an Unknown error, NullReferenceException, or OAuth authentication error.
Before troubleshooting, check the Microsoft 365 Admin Center Service Health dashboard to confirm if there is an active global service incident affecting the PST import service across multiple tenants.
Create the Required Azure AD Service Principal via PowerShell
Resolve OAuth and unknown errors by recreating the missing Azure AD service principal required for the import service.
In some cases, the Microsoft 365 import service fails because the underlying Azure Active Directory service principal is missing or disconnected. Running a specific PowerShell command can recreate this principal and restore functionality.
Right-click the Windows Start menu, select Windows PowerShell (Admin) or Terminal (Admin) to open an elevated command prompt.
Type the command 'Connect-AzureAD' and press Enter. Log in with your Microsoft 365 Global Administrator credentials when prompted.
Run the following command to create the required app principal: 'New-AzureADServicePrincipal -AppId 3eb95cef-b10f-46fe-94e0-969a3d4c9292'.
Return to the Microsoft Purview compliance portal and restart your PST import job to see if the error is resolved.

Validate the PST Mapping File and Check Service Health
Ensure your PST mapping CSV is formatted correctly and rule out global Microsoft 365 outages.
Switch to WPS Office for a Lightweight Productivity Experience
While dealing with complex Microsoft 365 server migrations, you can rely on WPS Office for your daily document productivity. It offers a free, lightweight, and highly compatible alternative to Microsoft Office desktop apps.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the downloaded setup file and follow the on-screen instructions to complete the fast installation process.
- 3. Open Office Documents: Launch WPS Office to immediately open, edit, and save your existing Microsoft Word, Excel, and PowerPoint files without formatting loss.

Frequently Asked Questions
Why does my PST import show a NullReferenceException?
This usually happens due to a missing Azure AD service principal required by the Microsoft 365 import service, or an active global service outage affecting the Microsoft Purview compliance portal.
Where can I find the PST import logs in Microsoft 365?
You can download the import logs directly from the Microsoft Purview compliance portal under Data lifecycle management. Click on your specific import job and select 'Download logs'.
Do I need special permissions to run the Azure AD PowerShell fix?
Yes, you need to be a Global Administrator in your Microsoft 365 tenant to successfully run the 'Connect-AzureAD' command and create a new service principal.
What should I check in the PST mapping CSV file?
Ensure there are no leading or trailing spaces in your column headers, and that the Workload, FilePath, Name, Mailbox, IsArchive, and TargetRootFolder columns are populated correctly according to Microsoft's guidelines.




