SharePoint

Raffle Search with Sharepoint

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. We authenticate 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.

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/tenant" Right="FullControl" />
</AppPermissionRequests>

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