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 1


I takled about in this question. If you need to use MFA authentication, just use this manual for login.

Use this code:

if ( $MFA ) {
    Connect-SPOService -Url $urlSPOAdmin

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.