Updated - Office 365 Connection Script with Modern Auth (MFA) - Includes the Security and Compliance Center



Version 2.5 of my Office 365 Connection Script with Modern Auth - and MFA (Multi-Factor Auth) is now released. Updated to include connection to the Security and Compliance Center via PowerShell with Modern Auth.

This new version features a simple GUI to select the service you want to connect to.
This updated GUI supports both MFA enabled accounts and accounts not enabled for MFA

*** Download ***


The script will connect to the following services with Modern Authentication.
- Exchange Online
- SharePoint Online
- Skype for Business Online
- Azure AD v1
- Azure AD v2
- Azure Resource Manager
- Azure Rights Manager
- Security and Compliance Center
- Exchange Online Protection (as part of Exchange Online)

The script features a simple GUI to select the service you want to connect to -
Due to the nature of Multi-Factor Authentication, credentials cannot be used multiple times like my other connection scripts. It is for this reason that I have utilised a fully functional GUI where you simply choose the Office 365 service you want to connect to with Modern Authentication.

- Non-MFA enabled account
You will be presented with a pop-up credential window. Enter your administrator UPN and password and you will then be connected to that service.

 - MFA enabled account
You will be presented with a pop-up credential window. Enter your administrator UPN and password. After your credentials are accepted, the Multi-Factor Authentication process will send a text to your mobile / cell phone (depending on your choice of MFA verification).
Enter that code and once verified, you will be connected to that Office 365 service.

After authentication, you will then be able to run your scripts for the associated Office 365 service.
Note - If you need to connect to multiple services, just simply run the script multiple times to connect to the extra services.

Support -
Please see the resources section below for support.

-------------------------------------------------------------------------------------------------------

Resources -
- How to configure your desktop PC for Office 365 Administration - including MFA - Link
- How to configure Server 2012 R2 for Office 365 Administration - including MFA - Link
- How to enable MFA (Multi-Factor Authentication) for Office 365 administrators - Link
- How to connect to Office 365 via PowerShell with MFA - Multi-Factor Authentication - Link
- MFA Support - PowerShell modules and resources for Office 365  - Link

-------------------------------------------------------------------------------------------------------

If you need other PowerShell connection scripts that do not support Modern Auth - MFA connections, check out my other connection scripts.

- Office 365 and Azure PowerShell Connection Script - TechNet Download

- Office 365 Hybrid, Azure and Local Active Directory PowerShell Connection Script - TechNet Download

--------------------------------------------------------------------------------------------------------

Revision - 
Version 1.1 - 20/04/2017
Version 1.2 - 28/04/2017 - Added Skype For Business MFA
Version 1.3 - 01/07/2017 - Added variable for tenant name and UPN
Version 2.0 - 22/07/2017 - Major upgrade with Windows Form GUI
Version 2.5 - 2/10/2017 - Added connection to Security and Compliance Center.

No comments:

Post a Comment