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:
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.
- Launch Internet Explorer
- Click the SETTINGS COG icon in the top right corner
- Click INTERNET OPTIONS
- Click the SETTINGS tab
- Click TRUSTED SITES
- Click the SITES button
- Add *.microsoft.com and *.msftauth.net to the list, the click OK
- Drag the ALLOWED LEVELS FOR THIS ZONE to the lowest setting
- Click OK
- Try your PowerShell script again
0 Comments