In this blog post, I’ll show you how to use Multi-Factor Authentication (MFA) with Office 365 Exchange Online new PowerShell module.
The Exchange Online team have enabled MFA for Exchange Online almost a year ago and it’s currently fully supported and available to the public.
MFA is an ideal solution For an organisation that would like to optimize their security position and protect their Exchange Online access.
MFA has two important requirements:
- Multi-Factor Authentication (MFA) needs to be enabled for the user.
- The user needs to be able to access the Exchange Admin Center and Install the new Exchange Online PowerShell module that supports MFA.
In order to use MFA, you will need to install the new Exchange Online PowerShell Module from the Exchange Admin Center.
To Install the new PowerShell Module, Open EAC -> Hybrid -> Click Configure on the 2nd option.
Important – You must use Internet Explorer in order to Install the Module.
Using Chrome or any other browser will result in the error below.
Application cannot be started. Contact the application vendor.
Click run and Install the module.
The installation will take a few minutes.
Once Installed you will see the Exchange Online PowerShell Module Icon on the desktop
Double click on it to connect
To connect to Exchange Online using MFA I will use the cmdlet below with my Exchange Online admin account.
Connect-EXOPSSession -UserPrincipalName email@example.com
After I press enter, The first screen will appear asking for to provide a username and password
Once accepted, I’ll receive an SMS with a code that I’ll enter in the verification screen
Once confirmed, all cmdlets will load to the PS session
No, I can start using Exchange Online PowerShell.
It’s also very important to note that you can still use the new PowerShell module without MFA enabled on your account.
In case it’s not enabled you will only be asked for a username and password.