Multi Factor Authentication (MFA) help safeguard application and data access via a range verification methods that includes phone call, text, app verification etc. Microsoft introduced MFA for Office 365 in 2014 that help administrators to secure corporate information in Office 365 by enforcing a second factor authentication. Connecting with Exchange online PowerShell with MFA enabled admin account is not supported with standard PowerShell module.
It’s highly recommended to configure Multi Factor Authentication (MFA) for all users and admin accounts in Office 365.
Connecting Exchange online PowerShell with MFA enabled admin account requires you to download and install Exchange Online Remote PowerShell module that support MFA.
Install MFA Enabled Exchange Online Remote PowerShell Module steps should be performed in Internet Explorer otherwise you will receive an error message that says “Application can’t be started“.
Install MFA Enabled Exchange Online Remote PowerShell Module
To connect exchange online using MFA enabled admin account, you need to install MFA enabled exchange online remote powershell module that can be downloaded from Exchange online admin center in Office 365.
- Login to Office 365 using global admin credentials.
- Navigate to Admin > Admin Centers > Exchange.
- In Exchange Admin Center, Navigate to Hybrid and Click Configure under “The Exchange online PowerShell Module supports multi-factor authentication. “
- The Wizard will launch application install process, Click on Install.
- Wait for the application installation process to complete.
- Once the Installation process is completed, it will launch Exchange Online PowerShell Module that supports MFA.
Connecting Exchange online PowerShell with MFA enabled Admin Account
Connecting Exchange online powershell with MFA enabled admin account requires you to perform the following steps.
- Run the following cmdlets to connect with Exchange Online PowerShell.
C:\> Connect-EXOPSSession -Username <firstname.lastname@example.org>
- When prompted, Enter your global admin credentials.
- Once user credentials are verified, you will be redirected towards MFA verification.
I have setup MFA to use verification code from mobile app.
- Once you verify the multi-factor authentication, Exchange online remote powershell module will start loading the remote session.
- Once the Remote Session is loaded, you can perform tasks related to Exchange online.
Multi-Factor Authentication help secure access to corporate environment and it’s highly recommended to set up MFA for all users and admin accounts. In this blog post, we review the process to access Exchange Online PowerShell after the admin account is setup for MFA. Connecting Exchange online PowerShell with MFA enabled admin account will ensure the security of your environment and help administrators perform their day to day tasks using PowerShell.