Forum Discussion
Connection closed when using the Invoke-PowerBIRestMethod to refresh dataset
- 6 years ago
For me, looks like this was related to the new TLS requirment. Adding this to my PS script resolved it:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Anonymous6 years ago
You are correct - we discovered that trick as well and it worked for us.
For what it's worth, I think I'm seeing the same thing as of today.
I built out a whole series of new scripts on Tue Jun 23rd and had tested them successfully all throughout the day.
But as of today (Jun 26th) I'm getting that same "underlying connection was closed..." error.
- GTS_ONE6 years agoAdvocate II
For me, looks like this was related to the new TLS requirment. Adding this to my PS script resolved it:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Anonymous6 years agoNot applicable
You are correct - we discovered that trick as well and it worked for us.