logo
search
Microsoft 365 Error Codes

How to Fix HTTP 401 Error When Running Search-MailboxAuditLog in Microsoft 365

Jason MillerJason Miller Oct 23, 2026 869 views

Question details

The user needs to resolve an HTTP 401 Unauthorized error that occurs when attempting to run a mailbox audit log search on a specific shared mailbox.

Fix HTTP 401 Error When Running Search-MailboxAuditLog in Microsoft 365
Product
Microsoft 365
Device & OS
not provided
Scenario
Running the Search-MailboxAuditLog cmdlet in Exchange Online to retrieve audit logs for a shared mailbox.
Observed behavior
The command returns an HTTP 401 Unauthorized error for one isolated shared mailbox, despite audit logging being active and administrator roles being configured properly.
Before you start

Ensure you have double-checked that your admin account possesses the necessary Audit Logs or View-Only Audit Logs roles in Exchange Online, and verify that audit logging is actually enabled for the affected shared mailbox.

Solution 1Recommended

Contact Microsoft 365 Support via Admin Center

Since the required roles are assigned and the error affects only a single shared mailbox, the issue is likely a backend synchronization or object corruption problem that requires intervention from the dedicated Exchange Online support team.

When an HTTP 401 error is isolated to a single mailbox despite correct global configurations, standard troubleshooting steps via PowerShell often cannot resolve the underlying tenant issue. Escalating the issue to Microsoft's backend engineering team is the most effective approach.

1
Sign in to Microsoft 365 admin center

Open your web browser and log in to the Microsoft 365 admin center using your global administrator or Exchange administrator credentials.

2
Navigate to the Support menu

On the left-hand navigation pane, locate and click on 'Support', then select 'New service request' from the dropdown menu.

3
Submit your issue details

Describe the HTTP 401 Unauthorized error occurring with the Search-MailboxAuditLog cmdlet, explicitly stating that it only affects one shared mailbox and that proper roles are already assigned. Submit the request for further investigation.

Contact Microsoft 365 Support via Admin Center
Security Reminder: Do not include passwords or other highly confidential information in your service request ticket description.
Free Microsoft Office alternative

Looking for a Lightweight and Reliable Office Suite?

While resolving administrative backend issues in Microsoft 365 requires IT support, your daily document work doesn't have to be complicated. WPS Office is a free, lightweight, and user-friendly alternative that provides excellent compatibility with Microsoft Office formats for all your local document needs.

  1. 1. Download WPS Office: Visit the official WPS website to download the free installation package for your operating system.
  2. 2. Install the Application: Run the installer and follow the on-screen instructions to set up WPS Office on your computer.
  3. 3. Open and Edit Documents: Launch WPS Office and instantly open your existing .docx, .xlsx, or .pptx files without formatting loss.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats.Free and lightweight, ensuring fast performance without heavy system resource usage.Familiar user interface for seamless and easy migration from Microsoft Office.All-in-one suite design for managing documents, spreadsheets, and presentations in a single app.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get an HTTP 401 error on only one shared mailbox?

This typically indicates a backend synchronization issue, an orphaned permission state, or corrupted object metadata specific to that shared mailbox in Exchange Online, which requires Microsoft support to investigate.

What roles are required to run Search-MailboxAuditLog?

You must be assigned the Audit Logs or View-Only Audit Logs role in Exchange Online. These roles are usually assigned by default to the Compliance Management and Organization Management role groups.

How can I verify if mailbox audit logging is enabled?

You can connect to Exchange Online PowerShell and run the command 'Get-Mailbox -Identity <MailboxIdentity> | Format-List AuditEnabled' to check if audit logging is currently active for the specific mailbox.