727-216-8010 / 805 618-1853 info@protekitsolutions.com

s mentioned in this Microsoft 365 article, with basic authentication disabled on your account, you have to change the way you login to Microsoft Office 365 Powershell to accommodate “Modern Authentication”.


He’s how it used to work and how it’s changed:

Powershell Basic Authentication

Running “$LiveCred = GetCredential” creates a prompt for credentials. Note that the credential request is not a Microsoft account login prompt.

After providing the credentials, you would run the “$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection” command to connect to Exchange PowerShell.

Previously, before Modern Authentication was required, it would connect successfully:

Now, when we run the “$Session…” command, we get an error:

Powershell Modern Authentication

Run “Connect-ExchangeOnline”.

Note that the credential prompt is now a Microsoft account login.

After logging in (and providing MFA if enabled), the Exchange PowerShell modules are loaded and you are returned to the PowerShell prompt with no errors.

If you require further help, please leave a comment and we will answer it as soon as possible. 

For professional IT support, please contact ProTek IT Solutions.