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:
PS C:\Users\Administrator> Connect-MsolService
Connect-MsolService : Authentication Error: Unexpected authentication failure.
At line:1 char:1
+ CategoryInfo : OperationStopped: (:) [Connect-MsolService], Exception
+ FullyQualifiedErrorId : System.Exception,Microsoft.Online.Administration.Automation.ConnectMsolService
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:
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" /v SchUseStrongCrypto /t REG_DWORD /d 1 /f
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!