The error "There was a problem with your authentication attempt" appears in Salesforce Files Connect when attempting to connect to Microsoft Office 365 (SharePoint). There are two possible causes for this issue:
Identifying which cause applies to your situation depends on the Administration Authentication Status displayed in the External Data Source record in Salesforce.
Before troubleshooting, confirm that your Files Connect setup follows one of the official Salesforce setup guides:
After completing the authentication flow, check the Administration Authentication Status field in the External Data Source record in Salesforce. Then follow the appropriate scenario below.
If the status is "Authenticated," the Token Endpoint URL in the Authentication Provider is likely incorrect.
To confirm, go to the Authentication Provider detail page and copy the Test-Only Initialization URL (found at the bottom of the page). Paste this URL into your browser. If your Authentication Provider is correctly configured, the browser returns an XML file containing an org_id and portal_id. If you do not receive the XML file, the Authentication Provider is not correctly configured.
To fix this, verify that the Token Endpoint URL is exact, including all characters. Even a small typo will prevent authentication from working.
A correct example would be:
https://accounts.accesscontrol.windows.net/mytestsite.onmicrosoft.com/tokens/O Auth/2?resource=00000003-0000-0ff1-ce00-000000000000/mytestsite.sharepoint.com@my testsite.onmicrosoft.com
If the status is "Not Authenticated" or "Pending," the user account used to authenticate does not have sufficient access to the SharePoint Site Collection defined in the Authorize Endpoint URL.
To resolve this, verify the following:
For example, if the target site is:
https://companyname.sharepoint.com/sites/site_collection_name/subsite1/subsite2/subsite3/target_site
Then the user must have at least View-only access to: site_collection_name, subsite1, subsite2, subsite3, and target_site.
000387720

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.