We are getting the below error message when trying to connect to SharePoint Online sites. Not sure what's happened but none of our CSOM scripts will work.
Exception calling "ExecuteQuery" with "0" argument(s): "Cannot contact web site 'https://tenant.sharepoint.com/' or the web site does not support SharePoint Online credentials. The responsestatus code is 'Unauthorized'. The response headers are 'X-SharePointHealthScore=0, X-MSDAVEXT_Error=917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically., SPRequestGuid=df2ed19d-603a-3000-a30b-ec1d18d76b72, request-id=df2ed19d-603a-3000-a30b-ec1d18d76b72,Strict-Transport-Security=max-age=31536000, X-FRAME-OPTIONS=SAMEORIGIN, SPRequestDuration=245, SPIisLatency=1,MicrosoftSharePointTeamServices=16.0.0.6119, X-Content-Type-Options=nosniff, X-MS-InvokeApp=1; RequireReadOnly,Content-Length=0, Content-Type=text/plain; charset=utf-8, Date=Thu, 02 Feb 2017 21:35:39 GMT, P3P=CP="ALL IND DSP CORADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI", Server=Microsoft-IIS/8.5,X-Powered-By=ASP.NET'."
+ $ctx.ExecuteQuery();
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : NotSupportedException