Skip to main content

Connect Spencer to SharePoint

This guide outlines the steps required to grant Spencer secure access to your SharePoint site.

Tom Segers avatar
Written by Tom Segers
Updated over 2 months ago

Prerequisites

Before you begin, ensure the following:

  • You have SharePoint Admin or Global Admin permissions in your Microsoft Azure tenant.

  • You have an existing SharePoint site in the same tenant.

  • You are familiar with the basics of Microsoft Entra ID (formerly Azure Active Directory) and Microsoft Azure Portal.


Step-by-Step Instructions

1. Gather SharePoint Details

  1. Navigate to your SharePoint domain.

  2. Locate the correct Site and List, and note the full URL.
    Example:
    https://spencer.sharepoint.com/sites/spencer-demo-site/SpencerList/Forms/AllItems.aspx


2. Create an App Registration in Azure

  1. Sign in to the Azure Portal and go to Microsoft Entra ID.

  2. From the Overview page, note your Tenant ID.
    Example: 1dcd0d57-3cdc-450f-87e9-4ad46e61bfee

  3. Go to Manage > App registrations and click New registration.

    • Name: Spencer

    • Supported account types: Accounts in this organisational directory only

  4. Click Register.

Upload the Certificate

  1. Go to Manage > Certificates & secrets.

  2. Under the Certificates tab, click Upload certificate.

    • File: Upload the certificate file (spencer_cert_sharepoint.pem) provided by Spencer (see attachment below).

    • Description: Spencer SharePoint certificate 2025

  3. After uploading, note the certificate thumbprint.
    Example: B6129BE7C6C2B97B931AFDF180BBEFBCA9A8AD4A


3. Attach SharePoint API Permissions

  1. In the same App Registration, go to Manage > API permissions.

  2. Click Add a permission.

    • Choose: Microsoft APIs > SharePoint

    • Select: Application permissions

    • Under Sites, select:

      • Sites.FullControl.All (temporary)

      • Sites.Selected

  3. Click Add permissions.

  4. Under Configured permissions, click Grant admin consent for Spencer and confirm.


4. Grant Access via Microsoft Graph Explorer

  1. Sign in using your Microsoft 365 admin account.

  2. Click your profile avatar in the top left and select Consent to permissions.

  3. Search for and consent to: Sites.FullControl.All.

Retrieve SharePoint Site ID

  1. Use the following query in Graph Explorer:

    • HTTP method: GET

    • URL:
      https://graph.microsoft.com/v1.0/sites/{domain}.sharepoint.com:/sites/{siteName}?$select=id
      Example:
      https://graph.microsoft.com/v1.0/sites/spencer.sharepoint.com:/sites/spencer-demo-site?$select=id

  2. Click Run query and copy the returned Site ID.


5. Grant Spencer Access to the SharePoint Site

  • In Graph Explorer:

    • HTTP Method: POST

    • API Version: v1.0

    • Request URL:
      https://graph.microsoft.com/v1.0/sites/{siteId}/permissions

    • Request Body:

{ 
"roles": ["manage"],
"grantedToIdentities": [{
"application": {
"id": "{appregistrationClientId}",
"displayName": "Spencer"
}
}]
}
  • Click Run query.

  • Confirm the response status is 201 Created.


6. Remove Temporary Full Control Permission

  1. Return to Microsoft Entra ID > App registrations > Your "Spencer" app.

  2. Navigate to Manage > API permissions.

  3. Next to Sites.FullControl.All, click the three dots (⋮) and:

    • Select Revoke admin consent, then confirm.

    • Select Remove permission, then confirm.


✅ Final Checklist: Share These Details with Spencer

Variable

Example

SharePoint URL

https://spencer.sharepoint.com/sites/spencer-demo-site/SpencerList/Forms/AllItems.aspx

SharePoint Site ID

spencer.sharepoint.com,5eefd12e-cf7a-4434-a332-8500e7c5591e,52080641-f230-4e61-bebd-5523ca7e317f

Microsoft Tenant ID

1dcd0d57-3cdc-450f-87e9-4ad46e61bfee

App Registration Client ID

389ef4bb-979e-4378-97fc-5c34f0b7f36d

Certificate Thumbprint

B6129BE7C6C2B97B931AFDF180BBEFBCA9A8AD4A


If you encounter any issues during the setup, please contact Spencer Support for further assistance.

Did this answer your question?