Step- 1. Creation of Auth Provider in Salesforce

  • In Salesforce, Go to Setup-> Security Controls ->Auth. Providers. Click New
  • Specify the provider type as ‘Microsoft Access Control Service’.
  • Input data for all the mandatory fields.

Name – Name of the provider

URL-Suffix – Automatically populated once the name is specified

Consumer Key – Temporarily specify a dummy value. Need to be changed after registering the salesforce app in SharePoint.

Consumer Secret – Temporarily specify a dummy value. Need to be changed after registering the salesforce app in SharePoint.

Authorize Endpoint URL – change the below URL with the production site name.

https://test.sharepoint.com/sites/tenthplanet/_layouts/15/OauthAuthorize.aspx

Token Endpoint URL – Change domain name of production.

https://accounts.accesscontrol.windows.net/test.onmicrosoft.com/tokens/OAuth/2?resource=00000003-0000-0ff1-ce00-000000000000/test.sharepoint.com@test.onmicrosoft.com

  • Click Save
  • Make note of the callback URL generated.

Step-2. Registering Salesforce app in SharePoint

  • Access the below link. Change URL to the deployment site URL. https://test.sharepoint.com/sites/tenthplanet/_layouts/15/appregnew.aspx
  • Click ‘Generate’ for Client id.
  • Click ‘Generate’ for Client Secret.
  • Make note of the client id and client secret.
  • Specify title.
  • Specify Redirect URI – The callback URL generated in Step 1 to be provided here.
  • Now move to salesforce and open the Auth. Provider created in step 1. Edit and replace the Customer key and customer secret with client id and client secret. Then click save.

Step-3. SharePoint permissions for registered app

  • Access the below link. Change URL to the deployment site URL.
  • In the App Id field, specify the client id generated in step 2 and click lookup. The title, App Domain and Redirect URL get automatically populated.
  • In the Permission Request XML, specify the below content.

<AppPermissionRequests>

<AppPermissionRequest Scope=”http://sharepoint/content/sitecollection/web/list&quot;&nbsp;Right=”Read”/>

</AppPermissionRequests>

  • Click create
  • The next screen, will request the user to select the list. Choose the library created for PMLT and click Trust IT.

Step-4. Edit the Auth provider in Salesforce

  • In Salesforce, Go to Setup-> Security Controls ->Auth. Providers. Click edit next to authentication provider created previously.
  • Edit the values for the following fields.
  • Consumer Key – enter the “Client id” value which was generated in Step-2.
  • Consumer Secret – enter the “Client Secret” value which was generated in Step-2.
  • Click Save.

Step-5. Enable the Files connect option in Salesforce

  • In Salesforce, Go to Customize->Chatter->Files connect->Settings
  • Click Edit and do the following
  • Enable Files Connect- Tick the check box.
  • File Sharing – select copy from the drop down.
  • Click Save.

Step-6. Creation of External Data source in Salesforce

  • In Salesforce, Go to setup->Develop->External data source.
  • Click New External Data source. Input the following fields
  • Label – Enter the name for the external data source.
  • Name – Automatically populated once the label is filled.
  • Type – Select “Files Connect: SharePoint Office 365” from the drop down.
  • Site URL – Enter the SharePoint site url

e.g. https://test.sharepoint.com/sites/tenthplanet

  • Identity Type – Select Per user from the drop down
  • Authentication Provider – Select the Auth provider which was created in step-1.
  • Scope- Leave empty.
  • Start Authentication Flow on save – tick the check box.
  • Click Save
  • Now it will navigate to the SharePoint site. Login to the SharePoint using the credentials.
  • The next screen will request the user trust the connection so click Trust it.
  • It will navigate to the Salesforce URL, now click allow button. The connection was successfully done between the SharePoint and Salesforce.