Microsoft Sharepoint
Official documentation: Microsoft Sharepoint API docs
Authentication
Microsoft Sharepoint uses API key authentication.
- Go to the Connections page and create a New Connection
- Select Microsoft Sharepoint REST API from the Connector dropdown
- Enter a Connection name
- Fill in the following credentials:
| Field | Required |
|---|---|
| Host | ✅ |
| Site | ✅ |
| Client Id | ✅ |
| Client Secret | ✅ |
| Realm Id | ✅ |
In order to start using the hibase connector to the Microsoft Sharepoint REST API, you need to get an Access Token to your Sharepoint installation.
Register a new app by navigating to https://[Host].sharepoint.com/_layouts/15/appregnew.aspx, or https://[Host].sharepoint.com/sites/[Site]/_layouts/15/appregnew.aspx, where Host is the subdomain assigned to your sharepoint installation. This requires the right set of permissions and you might need administrator support in order to get access
Click Generate next to Client ID and Client Secret
Type hibase in Title, localhost in App Domain and https://localhost in Redirect URI. Next, click on Create
Take note of the generated Client ID and Client Secret
Navigate to https://[Host].sharepoint.com/_layouts/15/appinv.aspx, or https://[Host].sharepoint.com/sites/[Site]/_layouts/15/appinv.aspx
Copy-paste your Client ID in the App ID field and hit Lookup in order to find your app
In the Permission Request XML, paste the following in order to grant the app Read access to Sharepoint:
<AppPermissionRequests AllowAppOnlyPolicy="true">
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Read"/>
</AppPermissionRequests>
Click Create and hit Trust it in the next screen
Issue a GET request to https://[Host].sharepoint.com/_layouts/15/_vti_bin/client.svc, or https://[Host].sharepoint.com/sites/[Site]/_layouts/15/_vti_bin/client.svc with Authorization: Bearer as a header, for example in curl:
curl -v \
-H "Authorization: Bearer" \
https://[Host].sharepoint.com/_layouts/15/_vti_bin/client.svc
Copy the realm value from the www-authenticate header provided in the response. This is your Realm ID, which you will need in the following step
Provide your Client ID, Client Secret, Realm ID and Host to the hibase connector for Sharepoint when adding it to your account
Endpoints
Get List (API docs)
Retrieve items from a SharePoint Online list.
Returned Data: All fields from the API response are automatically flattened into columns.