Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS changes causing MS teams to fail #138

Closed
TobyHawkes opened this issue Dec 19, 2018 · 2 comments
Closed

TLS changes causing MS teams to fail #138

TobyHawkes opened this issue Dec 19, 2018 · 2 comments
Assignees

Comments

@TobyHawkes
Copy link

Our MS teams poshbot stopped responding to messages recently

Current Behavior

An error is logged in poshbot.log "Error authenticating to Teams" which is caused by Invoke-RestMethod
"The underlying connection was closed: An unexpected error occurred on a send."
The command it is running is: $members = Invoke-restmethod -uri $uri -headers $headers
which is on line 7939 (in version 0.11.3)

Possible Solution

MS have updated their requirements for TLS as noted here: https://blog.botframework.com/2018/11/06/announcement-azure-bot-service-enforcing-transport-layer-security-tls-1-2/
To enforce tls version 1.2 when the module is running invoke-restmethod I added "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12" at the top of poshbot.psm1

Your Environment

  • Module version used: 0.11.3
  • Operating System and PowerShell version: server 2016, powershell 5.1.14393.2608
@devblackops
Copy link
Member

Thanks for reporting this @TobyHawkes! Easy fix to ensure we're using TLS 1.2 with the code you provided.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

@devblackops devblackops self-assigned this Dec 19, 2018
@TobyHawkes
Copy link
Author

Great, thanks for the quick response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants