Enable/Disable per-user MFA with Microsoft graph powershell SDK

Enable/Disable per-user MFA with Microsoft graph powershell SDK
1

Upvotes

Upvote

 Jan 10 2022
0 Comments 
New

Hello,

The equivalent to enable / disable per-user MFA using Microsoft graph powershell SDK:

Create the StrongAuthenticationRequirement Object

$sa = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
$sa.RelyingParty = "*"
$sa.State = "Enabled"
$sar = @($sa)

Enable MFA for the user

Set-MsolUser -UserPrincipalName $user -StrongAuthenticationRequirements $sar

Regards,