Enabling MFA with PowerShell

As you know, MFA could be a great feature when we are talking about identity security in O365/Azure, so in case you need to enable MFA for a user or bunc of users in your company, you can use the following PowerShell to do that:

$st = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
$st.RelyingParty = "*"
$st.State = “Enabled”
$sta = @($st)
Set-MsolUser -UserPrincipalName StellaC@domain.onmicrosoft.com -strongAuthenticationRequirements $sta 
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s