Skip to content
M365-06 Field-tested

Connect-SPOService fails with "No valid OAuth 2.0 authentication session"

A missing msalruntime DLL breaks SharePoint Online Management Shell sign-in. Use the system browser instead.

Symptom

Connect-SPOService fails with “No valid OAuth 2.0 authentication session exists”.

Cause

The module’s embedded sign-in depends on an msalruntime DLL that’s missing or failing to load.

Fix

Sign in through the system browser instead:

Connect-SPOService -Url https://<tenant>-admin.sharepoint.com -UseSystemBrowser $true

Verify

Get-SPOTenant returns tenant settings.

Seeing this in your environment?

We can check for this, and everything around it, as part of an audit.

Ask us about M365-06

Find out what's really going on in your tenant.

Tell us what you run and what's worrying you. We'll recommend the right audit, and tell you honestly if you don't need one.