Is there a reason you are not using the Connect-ExchangeOnline commandlet?
Connect-ExchangeOnline -UserPrincipalName navin@contoso.com
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All
i am getting below error when connecting to exchange online PowerShell module.
I have global admin rights and also i have Organization Management admin role in exchange admin center.
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
PS C:\windows\system32> $UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
At line:2 char:12
Is there a reason you are not using the Connect-ExchangeOnline commandlet?
Connect-ExchangeOnline -UserPrincipalName navin@contoso.com
Hi @Roger Roger
It seems you are trying to use basic authentication to connect to EXO powershell.
Please note that basic authentication is a less secure authentication method and is suggested to be turned-off in your Microsoft 365 tenants.
As DimitriS suggested, please consider using modern auth to connect to EXO powershell.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.