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