on-internet
← Community

Setting default for StrongAuthenticationMethods via Powershell

Stack Overflow ·

I'm using the following script to enable MFA methods for a user in Azure Active Directory (snippet taken from this article): Connect-MsolService $UserPrincipalName = "[email protected]" $SMS = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod $SMS.IsDefault = $true $SMS.MethodType = "OneWaySMS" $Phone = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationMethod $Phone.IsDefault = $false $Phone.MethodType = "TwoWayVoiceMobile" $PrePopulate = @($SMS, $Phone) Set-MsolUser -UserPrincipalName $UserPrincipalName -StrongAuthenticationMethods $P

Comments

Sign in or sign up to comment and upvote.

No comments yet.