I am still relatively new to Okta and its API, I have inherited a number of Powershell scripts used for administrative tasks on the system. Recently these scripts stopped working in our Okta dev/sandbox environment and fail with the error:
Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
However the exact same script works fine in our Okta production environment, they both use TLS1.2, same ciphers. The workstation I am running the script on has now problem accessing our Okta dev environment via its web interface.
As of today, Okta production env still offers TLSv1/v1.1/1.2, while the preview env only works with TLSv1.2. Most likely it’s something on your side (script, network library, network infrastructure, etc) that prevents TLSv1.2 from being used.
It turned out that Powershell was defaulting to TLSv1 and this was being rejected. If anyone else is having the same issues with Powershell and the Okta API then you can add the following to your scripts/modules to explicitly use TLSv1.2