Exchange Online PowerShell multi factor authentication (MFA)

It’s a good thing to enable multi-factor authentication (MFA) for Office 365 administrators. For web based management portals this is not a problem, just enter your username and password, wait for the text message to arrive, enter it in the additional dialog box and you’re in.

For PowerShell this has been more difficult, but MFA for PowerShell is available as well for some time now. When you login to the Exchange Admin Center and select hybrid in the navigation pane you can configure a hybrid environment (first option) or install and configure the Exchange Online PowerShell MFA module.

Click on the second configure button, and in the pop-up box that appears click Open to start the installation of the PowerShell module:

image

In the application install warning that pops up next click install. If you look closely you’ll notice that this download is stored somewhere in a Microsoft Azure storage account Smile

image

After a couple of seconds the PowerShell module is installed. When you click the Start button and type “PowerShell” you’ll see it appear:

image

When you start it, a regular blue PowerShell windows appears:

image

You can connect to Exchange Online using the following command:

Connect-EXOPSSession -UserPrincipalName <tenant admin>

image

A credentials pop-op will appear, and after entering your credentials a second pop-up will appear. Enter the verification code you’ve received on your mobile device and you’re good to go.

image

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s