When trying to Test the connection to an O365 environment the following error is thrown:
"Unable to authenticate with Office 365 due to the following error: Attempted to perform an unauthorized operation. Please check your SharePoint authentication settings.
Details:
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
at Quest.NSP.SharePoint.Office365CredentialsRefresher.Login(String url, ClientCredentials credentials, StringBuilder logging)
at Quest.NSP.SharePoint.UI.TestConnectionsForm.TestOffice365Authentication(Object testContext)
Diagnostics:
Error accessing login token: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
SharePoint web services (O365 authentication) is selected the correct SharePoint logon credentials have been entered.