Forcing TLS1.2 when using Azure Hybrid Runbook Workers

We have some Azure automation running to query a REST API using Azure Hybrid Runbook Workers.

Recently the connectivity started failing with error of “The request was aborted: Could not create SSL/TLS secure channel.”

This was caused by the deprecation of legacy TLS Ciphers (1.0 and 1.1)

The work around is to force the PowerShell Runbook to use TLS1.2 by adding the following line to the script:

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


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.