logo
search
Email Migration

How to Fix PST Import Fails with Unknown Error in Microsoft 365

Steven ParkerSteven Parker Oct 26, 2026 868 views

Question details

Users experience failures when attempting to import PST files via the Microsoft 365 compliance portal.

How to Fix PST Import Fails with Unknown Error in Microsoft 365
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 you start

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.

Solution 1Recommended

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.

1
Open PowerShell as Administrator

Right-click the Windows Start menu, select Windows PowerShell (Admin) or Terminal (Admin) to open an elevated command prompt.

2
Connect to Azure AD

Type the command 'Connect-AzureAD' and press Enter. Log in with your Microsoft 365 Global Administrator credentials when prompted.

3
Create the Service Principal

Run the following command to create the required app principal: 'New-AzureADServicePrincipal -AppId 3eb95cef-b10f-46fe-94e0-969a3d4c9292'.

4
Retry the PST Import

Return to the Microsoft Purview compliance portal and restart your PST import job to see if the error is resolved.

Create the Required Azure AD Service Principal via PowerShell
Administrator Rights Required: You must have Global Administrator credentials to successfully authenticate and run Azure AD PowerShell commands.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install WPS Office: Run the downloaded setup file and follow the on-screen instructions to complete the fast installation process.
  3. 3. Open Office Documents: Launch WPS Office to immediately open, edit, and save your existing Microsoft Word, Excel, and PowerPoint files without formatting loss.
Seamless compatibility with Microsoft Word, Excel, and PowerPoint formats.Lightweight installation that doesn't consume excessive system resources.Familiar tabbed interface for easy transition from Microsoft Office.Built-in PDF editing, conversion tools, and local document management.
QA img-9

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.