Nov 17 2016 07:40 AM
how to change user status in bulk from mfa enabled to disabled. i am trying the script below which is not working
$users = Import-Csv 'C:\support\BulkUpdateMFASampleFile.csv'
foreach ($user in $users)
{
$st = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
$st.RelyingParty = "*"
$st.State = “Enabled”
$sta = @($st)
Set-MsolUser -UserPrincipalName $user.Username -StrongAuthenticationRequirements $sta
}
Nov 17 2016 08:18 AM
Manage to fix it put an old script and new script together to work it out
$users = Import-Csv 'C:\support\BulkUpdateMFASampleFile.csv'
foreach ($user in $users)
{
$mfa = @()
Set-MsolUser -UserPrincipalName $user.Username -StrongAuthenticationRequirements $mfa
}