1 minute read

If you have seen the screen below, you should definitely continue reading, because I’m gonna share with you very simple solution.

When it happened to me for the first time, I was a bit confused - until I found the solution - then I felt silly (LOL). The answer is enabling Modern Authentication.

It will take you 5 minutes if you are skillful in PowerShell and 15 if you are new to PowerShell as I was.

We will use 7 PowerShell commands, from connecting to Exchange Online through enabling Modern Authentication to verifying it and disconnecting.

In case you wanna connect to Exchange Online PowerShell via MFA, you have to first install a modul in Office 365 admin portal.
To read more click here.

Run PowerShell as an Admin and use the following commands:

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session -DisableNameChecking

Set-OrganizationConfig -OAuth2ClientProfileEnabled $true

Get-OrganizationConfig | Format-Table Name,OAuth* -Auto

Remove-PSSession $Session

Now, you guys should be all set to use MFA.

I believe, this is just a small delay, comparing to all the trouble, what using MFA can save you from.

And you only have to do it once per tenant!

Below you can find some more info regarding this topic:

I hope this publication will help you and please, feel free to reach out to us, if you have any questions.

To submit comments, go to GitHub Discussions.