SharePoint

Integrate Raffle AI with SharePoint by creating an API token. Effortlessly access and use your SharePoint data.

Setting Up SharePoint Access

This document describes the process of setting up access to SharePoint for Raffle to be able to connect and crawl the SharePoint content. The Raffle SharePoint connector is authenticating against the SharePoint REST API via Client ID and Client Secret (app registration) and this document will explain how to set this up.

Generate the Client ID and Client Secret

  1. Log in to the Microsoft Sharepoint Online account with sufficient permissions.

  2. Enter the following site or sub site URL Site: https://<subdomain>.sharepoint.com/sites/<site>/_layouts/15/appregnew.aspx

The App Information page appears.

  1. Click Generate next to the Client ID field. The value of the Client ID is displayed in the Client ID field.

The following image shows the App Information page where you can generate the values of the Client Id and Client Secret:

  1. Click Generate next to the Client Secret field. The value of the Client Secret is displayed in the Client Secret field.

  2. Enter an appropriate Title for the App in the Title field - for example “Raffle Search”

  3. App Domain: This field is only used for provider-hosted add-ins, which is not the case here, since the app registration is purely used for authentication. Fill in any value and make sure not to include protocols(https) or slashes(/).

  4. Same as above, the Redirect URI is not used and any value will work.

  5. Click Create. The page redirects to the Microsoft Sharepoint Online page and the following message appears:

The app identifier has been successfully created.

The values of the Client Id, Client Secret, Title, and redirect URL are displayed.

Please note, that if you are a site admin and still not allowed to create a new app reqistration under the site, you may need to get the proper permissions to do so by your tenant admin. Read more about that here SharePoint site collection admins can’t register apps.

Authorizing the Client App

The next step is to make sure that the Client App has access to reading the information in SharePoint.

The app (as well as client id) permissions are set via this page:

https://<subdomain>.sharepoint.com/sites/<sitename>/_layouts/15/appinv.aspx

The permission information needed is given by the following XML snippet:

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

On the page, first, specify app id / client id and click Lookup. After that, paste in the XML from above and click Create:

Once you click the Create button, you will get to a page where you need to confirm that you trust the XML specified.

As specified above, the app registration will only have read permissions and only to the SharePoint site in question. Once the Trust It button has been clicked, you’re all set and the Raffle SharePoint connector should be able to read the documents (.pdf, .docx etc) and site pages (.aspx).