During Authentication to SharePoint O365 in MNSP
some errors get generated as follows:
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:
Requesting security token from STS at 'https://xxxx.microsoftonline.com/xxxx/adfs/services/xxxx' for realm 'https://xxxxx.sharepoint.com/sites/xxxx'
Error accessing login token: An unsecured or incorrectly secured fault was received from the other party.
See the inner FaultException for the fault code and detail.
Attempting to retrieve STS URL for 'user@company.com'
Response from xxxxRealm.xxxx: {"State":4,"UserState":1,"Login":"user@company.com","NameSpaceType":"Managed",
"DomainName":"compnay.com","FederationBrandName":"XXXX","CloudInstanceName":"microsoftonline.com"}
Unable to find STS URL in response.
System.NullReferenceException: Object reference not set to an instance of an object.
at Quest.NSP.SharePoint.Office365CredentialsRefresher.GetSTSUrl
(IdentityModelCredentials credentials, StringBuilder logging)
at Quest.NSP.SharePoint.Office365CredentialsRefresher.GetFederatedLoginToken(String sharePointUrl, IIdentityModelHandler identityModel, IdentityModelCredentials credentials, StringBuilder logging)
at Quest.NSP.SharePoint.Office365CredentialsRefresher.Login(String url, ClientCredentials credentials, StringBuilder logging)