

I have done so and confirmed that I can now connect PowerShell to Exchange Online using an MFA- / TFA-enabled administrator account. + FullyQualifiedErrorId : System.Exception.ConnectMsolServiceĪccording to Microsoft's TechNet article "Connect to Exchange Online PowerShell using multi-factor authentication", I need to ( only using a Microsoft web browser, no less) install the " Exchange Online PowerShell Module". + CategoryInfo : OperationStopped: (:), Exception Import-Module MSOnline Connect-MsolService -Credential $Credentials} + FullyQualifiedErrorId : ParameterArgumentValidationError,Ĭonnect-MsolService : Authentication Error: Authentication cancelled by user. + CategoryInfo : InvalidData: (:), ParameterBindingValidationException ion:$true -Credential $Credentials Import-PSSession $Session Import. Provide a valid value for the argument, and then try running the command again. Import-PSSession : Cannot validate argument on parameter 'Session'. + FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed + CategoryInfo : OpenError: (:RemoteRunspace), PSRemotingTransportException $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Auth.

Access Denied For more information, see the about_Remote_Troubleshooting Help topic. This worked great until we enabled MFA / TFA on our global administrator accounts which then caused the above BAT file to fail with the following errors: New-PSSession : Connecting to remote server ps. failed with the following error message : $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Authentication Basic -ConnectionUri -AllowRedirection:$true -Credential $Credentials Ĭonnect-MsolService -Credential $Credentials

Previously, I used to connect PowerShell to Windows Azure Active Directory and Exchange Online using the following BAT file: off
