New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message: The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and try the request again.

Problem: When trying to connect to Exchange Online through PowerShell, I got this error message:
“New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and try the request again. For more information, see the about_Remote_Troubleshooting Help topic.”

The script I used to connect to Exchange Online:

#Get Credentials to connect
$Credential = Get-Credential
 
#Create the session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange `
    -ConnectionUri https://outlook.office365.com/powershell-liveid/ `
    -Credential $Credential `
    -Authentication Basic -AllowRedirection
 
#Import the session
Import-PSSession $Session

Solution:

Confirmed the user is already a member of the “Organization Management” Admin role in Exchange. Resolved the issue by making the below registry change:

  1. Open Registry Editor (RegEdit) as administrator and set the following Key: “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client” (Create the key, if it doesn’t exist!)
  2. Set the “AllowBasic” value to “1”
  3. Close and Re-Open PowerShell console (Sometimes works without reopening too!)

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message: The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration. Change the client configuration and try the request again.

  • Both the above steps didn’t helped us to resolve this issue.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *