Authenticate the User in Salesforce to access SharePoint files
Steps to authenticate the user to provide access in Salesforce to access SharePoint files
- The user must be authenticated to schedule the apex class (ScheduledFetchSharepointMetaInfo) and also to view the SharePoint files under the tab chatter. Below are the steps to authenticate the user.
- Click my settings (available in under the logged in user name, top right side).
- In personal-> click “My External Authentication Settings”.
- Click new button and it will display the screen as shown below
- Fill the below mandatory fields
- External Data Source ID – select the external data source which was created previously for SharePoint connector.
- Select external data source id as “SharePoint Data Source” which was already configured.
- User – click the lookup icon and select the user to provide access to the external data source.
- Authentication Provider – Click the lookup icon and select the auth provider which was created previously for SharePoint connecto
- Note: Select authentication provider as “SharepointOAuth” which was already configured.
- Start Authentication Flow on Save – tick this checkbox.
- Click Save.
- After click the Save button it will navigate to the SharePoint site. Input the login credentials and logged in to the SharePoint site. It will display the below screen
- Click Trust It, it will navigate to the Salesforce and display the screen as shown below
- Click Allow, then it will display the screen as shown below.
- Now the user has been authenticated to schedule the apex class (ScheduledFetchSharepointMetaInfo) and also to view the SharePoint Files under chatter tab.