If you are seeing this message when working on a PowerShell script that is trying to connect to a Microsoft service requiring MFA (multi factor authentication), you may notice that the window is actually Internet Explorer:


fix powershell mfa popup we can't sign you in javascript is required to sign in trusted sites

The solution is to set all of the Microsoft pages to be Trusted Sites and then to set Trusted Sites to have low security in the Internet Explorer options.

  1. Launch Internet Explorer
  2. Click the SETTINGS COG icon in the top right corner
  3. Click INTERNET OPTIONS
  4. Click the SETTINGS tab
  5. Click TRUSTED SITES
  6. Click the SITES button
  7. Add *.microsoft.com and *.msftauth.net to the list, the click OK
  8. Drag the ALLOWED LEVELS FOR THIS ZONE to the lowest setting
  9. Click OK
  10. Try your PowerShell script again


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *