Skip to content

Get-PnPfile throwing error "The underlying connection was closed: The connection was closed unexpectedly" #385

Answered by bukhaaaa
bukhaaaa asked this question in Q&A
Discussion options

You must be logged in to vote

@TheOnlySharePointGuy Yes, there were a couple things at play:

  • Ensure your SharePoint (or Azure application) credentials are valid & have the right permissions. Test it on a different machine.
  • Run a tracert to see where the traffic is being routed. Our firewall had rules that were preventing connection to SharePoint.
  • We had a case open with Microsoft, and found that our TLS ciphers were inactive. Ensure the following Cipher Suites are active (you can use a tool like IIS crypto):
    • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
    • TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
    • TLS_DHE_RSA_WITH_AES_128_GCM_SHA256

Then ensure TLS1.2 is being used for PowerShell.

Some h…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@bukhaaaa
Comment options

@TheOnlySharePointGuy
Comment options

Comment options

You must be logged in to vote
5 replies
@bukhaaaa
Comment options

@TheOnlySharePointGuy
Comment options

@bukhaaaa
Comment options

@TheOnlySharePointGuy
Comment options

@bukhaaaa
Comment options

Answer selected by bukhaaaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #382 on March 06, 2021 21:32.