Top
How to generate ClientID and SecretKey for SharePoint integration
  • 07 Sep 2022
  • 1 Minute To Read
  • Dark
    Light
  • PDF

How to generate ClientID and SecretKey for SharePoint integration

  • Dark
    Light
  • PDF

Generating Client ID and Secret Key for SharePoint Integration is a two-step process. 

Step 1: Register the Add-In

1. Log in with an admin account on the parent site, and then navigate to the following URL,

https://<sitename>.sharepoint.com/_layouts/15/appregnew.aspx
  • For sites: Replace the <sitename> in the above URL with your site name.
    For example, if your SharePoint site is https://abcd.sharepoint.com, then replace the <sitename> with abcd.

  • For subsites: To add subsites, append your subsite name to the site URL.
    For example, if your subsite URL is of the form: https://abcd.sharepoint.com/sites/subsite1, then the above URL is https://abcd.sharepoint.com/sites/subsite1/_layouts/15/appregnew.aspx

2. Enter the following information on the page that is displayed when you first visit the URL.

  1. In the App Information section, click the Generate button next to the Client Id and Client Secret text boxes to generate the respective values.  
  2. In the Title textbox, enter the Add-In.
  3. In the App Domain text box, enter the localhost.
  4. In the Redirect URI text box, enter https://localhost

3. Click Create

4. The Add-in is registered, and the following message is displayed.

Note
Make a note of the above information and share the Client ID and Client Secret with a Whatfix representative.

Step 2: Grant permissions for the Add-in

Once the Add-In is registered, the next step is to set the permissions for that Add-in to access the SharePoint data. 

Note
Whatfix sets the read permission level to the web scope to be able to read the web information.

1. Navigate to the following URL in the browser. This redirects to the Grant permission page.

https://<sitename>.sharepoint.com/_layouts/15/appinv.aspx
  • For sites: Replace the <sitename> in the above URL with your site name.
    For example, if your SharePoint site is https://abcd.sharepoint.com, then replace the <sitename> with abcd.

  • For subsites: To add subsites, append your subsite name to the site URL.
    For example, if your subsite URL is of the form: https://abcd.sharepoint.com/sites/subsite1, then the above URL is https://abcd.sharepoint.com/sites/subsite1/_layouts/15/appinv.aspx

2. Enter the Client ID (which you have generated earlier) in the App Id text box and click the Lookup button.

your title goes here
This populates the value of other text boxes in Title, App Domain, and Redirect URL.


3. In the App's Permission Request XML section, enter the following permission request in XML format.

<AppPermissionRequests 
AllowAppOnlyPolicy="true"><AppPermissionRequest 
Scope="http://sharepoint/content/sitecollection/web" 
Right="Read" /></AppPermissionRequests>
your title goes here
The permissions granted are Read-Only, so our API cannot update or delete any data from your SharePoint site.

4. Click Create.

5. Click Trust It to trust the Add-in to read items from your website. 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.