SharePoint OAuth Connection

The SharePoint connector has now been re-worked to make this process easier. Please see the new documentation for the updated process.

Use the following guide to learn how to connect to SharePoint Online using OAuth Authentication. Available from version 3.0.1276.

You may need to use OAuth Authentication if Legacy Authentication has been disabled on your Office 365 tenant.

The summary of the flow you need to follow

  1. Create the App in Azure AD
  2. Give the App permission in SharePoint at this link: https://{yourdomain}
  3. Connect in Data Sync using the credentials you gathered in the first step.

To view a list of registered apps in your SharePoint site you can do so at https://{yourdomain}

1. Create the App in Azure AD

Login to your Azure Portal and navigate to Azure AD > App Registrations > New Registration to create your connection.

App Registration

Now enter in a name for your application and choose the supported account types, for this we only need access to those within our organization so we have selected Accounts in this organizational directory only.

Once you're done click onto Register to create the app. You'll now be given an overview of your app credentials (Client ID and Tenant ID).

Add a Client Secret

Now you need to create a client secret. To do this go to Certificates & Secrets and click onto New client secret. Type in a description and set an expiry for the secret. Once you are done click Add.

New Client Secret

You now need to copy the client secret value to use in Data Sync later on. Please make a note of this value as you will not be able to view it again. If you loose it you will need to create a new client secret.

Copy Client Secret

2. Set Permission Level

Now we need to set the permission levels for the app in SharePoint, do this by navigating to the application page at: https://{yourdomain}

Enter in the Client ID you generated earlier into the App ID field and lookup the Application. This will enter in the details you entered earlier into the other fields.

We now need to add the XML permission statement to give full control to the application. The XML we use to do this is:

<AppPermissionRequests AllowAppOnlyPolicy="true">
	<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" />

Define App Permissions

Once you are done click Create to set the permissions.

To learn more about these permissions please see the Microsoft website here .

3. Connect in Data Sync

To connect in Data Sync open the connection window and go to SharePoint Online provider. Enter in the URL to your base url of your SharePoint site i.e. http://<sharepointurl>/<site1>/<site2> and click on the ellipsis (...) in the OAuth2 field to open the OAuth credentials window.

SharePoint Connection

Enter in your Client ID and Client Secret and click OK to save the credentials.


Choose the list or library you wish to connect to from the ListName dropdown menu and then connect by clicking Connect & Create Library Connection to save the connection to your connection library. Otherwise simply click Connect.

Save to Connection Library

You're now connected to your SharePoint site and can configure your Data Sync project as you need to.


My Client Secret has Expired or I have forgotten my Client Secret

If your client secret has expired or you have lost it then you can fix this by creating a new one. Log into your Azure Portal, open Azure AD, click onto App Registrations and then open your SharePoint App. Now go to Certificates & Secrets and click onto New Client Secret. Type in a name, set the expiry length and then click Save. You need to copy the value that has been generated and update your client secret in Data Sync.

It is worth saving the client secret value as you will not be able to access it later.

You can then delete the old client secret.