Connect to Office 365 services with multifactor authentication (MFA) and PowerShell


Multifactor authentication (MFA) is an Office 365 security best practice, especially for administrator accounts. The Office 365 portal enforces MFA for accounts that have it enabled, but administrators also use PowerShell to manage Office 365.

To connect to Office 365 services with MFA and PowerShell:

For each of these connections, you are prompted with a dialog box to collect the account user name and password and then an additional dialog box for MFA information, such as a verification code. Here is an example for SharePoint Online:

mfa2

To experiment with MFA in an Office 365 trial subscription, see Multi-factor authentication for your Office 365 dev/test environment.

CloudDevTest_New

 

To join the CAAB, become a member of the CAAB space in the Microsoft Tech Community and send a quick email to CAAB@microsoft.com to introduce yourself. Please feel free to include any information about your experience in creating cloud-based solutions with Microsoft products or areas of interest. Join now and add your voice to the cloud adoption discussion that is happening across Microsoft and the industry.

Comments (2)

  1. My Blog says:

    Great post. I was checking continuously this blog and I am impressed!
    Very helpful information particularly the last part :
    ) I care for such information much. I was seeking this particular information for a very long time.
    Thank you and good luck.

  2. Terry Munro says:

    Feel free to use my script – Office 365 Connection Script with MFA – Multi-Factor Authentication
    https://gallery.technet.microsoft.com/Office-365-Connection-47e03052

    The script will connect to the following services with MFA (Multi-Factor Authentication) enabled-

    – Exchange Online
    – SharePoint Online
    – Skype for Business Online
    – Azure AD v1.0
    – Azure AD v2.0
    – Azure Resource Manager
    – Azure Rights Manager
    – Exchange Online Protection

Skip to main content