If you are configuring a SharePoint access token to connect to Office 365 and get a validation error, it might be due to various reasons
- Your SharePoint Site Collection URL is not accessible.from AgilePoint server or user might not have permission to access the site.
- Check the credentials you have entered
- If you have Multi Factor Authentication enabled for your Office 365, even though your browser is in a white listed IP range, AgilePoint server which has to actually perform the operation might be getting blocked due to MFA. That being the case, you need to bypass Multi Factor Authentication for AgilePoint Server. I have covered this in another article
4.If none of the above seem to be the problem, check the error message you are getting in the server log file. Your Office 365 admin might have explicitly blocked access through API. You might see a message similar to this
“Cannot contact web site ‘https://mysite.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is ‘Unauthorized’. The response headers are ‘X-SharePointHealthScore=0, X- MSDAVEXT_Error=917656; Access+denied., SPRequestGuid=dac1d79d-70f6-3000-e33a-0a1833334aa2, request-id=dac1d79d-70f6-3000-e33a-0a1833334aa2, Strict-Transport-Security=max-age=31536000, X-FRAME-OPTIONS=SAMEORIGIN, SPRequestDuration=69, SPIisLatency=0, MicrosoftSharePointTeamServices=220.127.116.1116, X-Content-Type-Options=nosniff, X-MS-InvokeApp=1; RequireReadOnly, Content-Length=0, Content-Type=text/plain; charset=utf-8, Date=Thu, 23 Feb 2017 07:47:55 GMT, P3P=CP=”ALL IND DSP COR ADM 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’. “
Turns out that this setting: Set-SPOTenant -LegacyAuthProtocolsEnabled $False prevents the login using CSOM API. One of your admin might have run this command.
Just enter:Set-SPOTenant -LegacyAuthProtocolsEnabled $True in a SharePoint PowerShell command
This will fix the issue.