How to resolve “Could not create SSL/TLS secure channel” exception for SharePoint Online when using PnP PowerShell

When I tried to connect SharePoint Online through PnP PowerShell by using below command.

PS: > $cred = Get-Credential
PS: > Connect-PnPOnline –Url https://<tenant>.sharpeoint.com –Credential $cred

I have received the below error message.

Connect-PnPOnline : The request was aborted: cluld not create SLL/TLS secure channel.

I have checked the code. Oh… and I was entered the url with typo error to connect the site.

SSL/TLS Connection Issue
SSL/TLS Connection Issue

So, I have corrected the url and tried to connect the site. It works fine.

PS: > $cred = Get-Credential
PS: > Connect-PnPOnline –Url https://<tenant>.sharepoint.com –Credential $cred

Root cause:

This issue will raise, when we provide the wrong URL.

Solution:

Please check the URL once again, before running the code.

SSL/TLS Connection Success
SSL/TLS Connection Success

Leave a Reply

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