Bad Request error when you try to connect to Exchange Online PowerShell
Original KB number: 4482720
Symptoms
When you try to connect to Exchange Online PowerShell, you receive the following error message:
New-PSSession: [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message: Bad Request For more information, see the about_Remote_Troubleshooting Help topic.
Cause
This issue occurs if your account has the RemotePowerShellEnabled
parameter value set to False.
Resolution
To resolve this issue, have another administrator set the parameter value to True by running the following PowerShell command:
Set-User -identity user@contoso.com -RemotePowerShellEnabled $True
Note
Allow 15-20 minutes for the setting to fully take effect, and then try to connect to Exchange Online PowerShell again.