I have several scripts to edit user profile fields through Powershell without active MFA. Sure I can have a user with a complex password outside MFA but I don't want that. Can anyone point me to one script that works with MFA? It's a sharepoint online system. Thanks a lot Nuno
1 Answer
I takled about in this question. If you need to use MFA authentication, just use this manual for login.
Use this code:
if ( $MFA ) {
Login-AzureRmAccount
Connect-SPOService -Url $urlSPOAdmin
}
Hope it helps!