Thursday , October 17 2019
Home - Don't Forget! - The pain of TLS 1.2 with PowerShell module for Azure Active Directory (MSOnline)

The pain of TLS 1.2 with PowerShell module for Azure Active Directory (MSOnline)

Building labs in a hurry sometimes can bite you with recent changes in Office 365 connections.  I just got hit with a problem with PowerShell module for Azure Active Directory not connecting:

The problem relates to the connection type from a very unpatched (on purpose) Windows 2016 lab server for developing a Powershell script against Azure AD.  While working out the authentication errors I noticed a TLS issue.  At this point of time there has been a major change by Microsoft from TLS 1.1 to 1.2 which stopped the Auth Process to connect using command Connect-msolservice.

Running the following command fix this issue:

This force .net 4.x or higher to use TLS 1.2 for connections. Powershell Connections to Azure AD now restored.

I hope this help others!

 

Check Also

Mac Outlook 2016 Screen/View Crashed and Flashing black

The Outlook 2016 client has been trusted workhorse for email since the full release.  However …

4 comments

  1. I ran into this problem and am so glad you wrote up a nice and easy guide to fixing it. It tested perfectly without a restart to resolve my connectivity issues! Thanks!

  2. I was having the exact same issue. I was throwing the error when I ran my script from the Powershell ISE. I used this workaround and it did the trick…thanks!

  3. Thanks a lot. This is awesome to solve a problem I have been ignoring 🙂

  4. I was having this issue with a central Powershell reporting server I had established. Thank you for finding this out!

Leave a Reply

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