PowerShell: Disable MFA For All O365 Users

KB ID 0001655

Problem

If you have something boring/repetitive to do then Powershell is your friend! I needed to do this for a client that’s replacing their Office365/Azure AD MFA (Multi Factor Authentication) with Duo.

Solution

Connect to your Microsoft Services Online, i.e. Office365/Azure, using your administrative credentials with the following command;

Connect-MsolService

Then (Note: I’ve got more than 1000 users so I need to add the MaxResults switch).

Get-MsolUser -MaxResults 2000 | Set-MsolUser -StrongAuthenticationRequirements @()

Disable MFA for ALL users Office365

Office 365: Disable MFA For One User

Similar to above;

Get-MsolUser -UserPrincipalName {user-name} | Set-MsolUser -StrongAuthenticationRequirements @()

Related Articles, References, Credits, or External Links

NA

Author: PeteLong

Share This Post On

2 Comments

  1. Hi,

    thanks for that article
    -UserPrincipleName is written -UserPrincipalName

    Best regards from Germany

    Post a Reply
    • Thanks for spotting that!

      Post a Reply

Leave a Reply to Ekin Cancel reply

Your email address will not be published. Required fields are marked *