Fix PowerShell MFA Login Error: Object Does Not Support Property Includes
Question details
The user encounters a JavaScript error stating 'Object doesn't support property or method includes' and a blank authentication window when attempting to sign in using PowerShell with Multi-Factor Authentication (MFA).

- Product
- Microsoft PowerShell / Online Services
- Device & OS
- not provided
- Scenario
- Attempting to authenticate into Microsoft online services via PowerShell using MFA.
- Observed behavior
- A blank authentication window appears, accompanied by a JavaScript error regarding the 'includes' method, blocking the login process.
Ensure you have administrator privileges on your computer and that your Windows operating system is fully up to date, as this error is often caused by legacy underlying web components.
Update PowerShell Modules to Use Modern WebView2
This JavaScript error occurs because legacy PowerShell modules rely on older Internet Explorer rendering engines that do not support modern ES6 JavaScript methods like 'includes'. Updating the module forces it to use the modern Edge WebView2 engine.
Microsoft has deprecated the legacy Internet Explorer components previously used for authentication prompts. Updating your management modules will switch the rendering engine to Microsoft Edge WebView2, bypassing the JavaScript incompatibility.
Right-click the Windows Start button and select 'Windows PowerShell (Admin)' or 'Terminal (Admin)' to open the console with elevated privileges.
Depending on the service you are connecting to, update the module. For Exchange Online, type: Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber and press Enter to install the latest V3 module.
Navigate to the official Microsoft Edge WebView2 download page in your browser and install the runtime if it is not already present on your system.
Run your connection command again (e.g., Connect-ExchangeOnline). The MFA prompt will now securely load using the modern WebView2 interface without throwing the 'includes' error.

Consult the Official PowerShell Support Channels
If updating your PowerShell modules does not resolve the blank screen, the issue requires deeper diagnostic logs reviewed by Microsoft identity experts.
Experience a Smoother Workflow with WPS Office
While troubleshooting complex PowerShell and administrative MFA errors can be tedious, your daily document work shouldn't be. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, freeing you from complex authentication loops for everyday tasks.

Frequently Asked Questions
Why does PowerShell show an 'Object doesn't support property or method includes' error?
This happens because the background Microsoft login script uses modern JavaScript (ES6) containing the '.includes()' method, but the PowerShell module is trying to render the MFA login prompt using an older Internet Explorer engine (IE11) that does not support modern JavaScript.
How do I fix the blank authentication window in PowerShell?
A blank authentication window typically means the login page failed to load due to script errors or blocked content. Updating to the latest PowerShell modules (like ExchangeOnlineManagement V3) and ensuring the Microsoft Edge WebView2 runtime is installed will force the prompt to use modern rendering, fixing the blank screen.
Does this JavaScript MFA error affect local Microsoft Access databases?
No, this specific JavaScript 'includes' error and blank MFA prompt are entirely related to Microsoft online service authentication via PowerShell. It does not impact the functionality of local Microsoft Access database applications.




