SharePoint OAuth Setup Guide

Get Knowledge Assistant

Do you want access to Knowledge Assistant? Contact your Zingtree Account Manager or our Support Team.

Follow these instructions to create a connection to your SharePoint environment that can be used by the Zingtree Knowledge Assistant.

1. Register an App in Azure (Microsoft Entra ID)

  • Go to https://portal.azure.com
  • Navigate to Microsoft Entra ID and select App registrations
  • Click New registration
  • Enter a name such as Zingtree SharePoint Connector
  • Choose Single tenant
  • Leave Redirect URI blank
  • Click Register

2. Get Client ID and Tenant ID

  • Application (client) ID is your Client ID
  • Directory (tenant) ID is used in your token URL

3. Create a Client Secret

  • Go to Certificates and secrets
  • Click New client secret
  • Add description and expiration
  • Click Add
  • Copy the value immediately

4. Access Token URL

  • https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token

5. Audience (Scope)

  • Recommended: https://graph.microsoft.com/.default
  • Alternative: https://{your-tenant-name}.sharepoint.com/.default

6. Expiration Time

  • 3600

7. Grant API Permissions

  • Go to API Permissions
  • Click Add a permission
  • Choose Microsoft Graph
  • Add Sites.Read.All and Sites.ReadWrite.All if needed
  • Grant admin consent

Final Field Mapping

  • Authentication Type: OAuth2 Client Credentials
  • Access Token URL: https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
  • Client ID: Application (client) ID
  • Client Secret: Generated secret
  • Audience: https://graph.microsoft.com/.default
  • Expiration Time: 3600

Example Token Request

POST https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
Content-Type: application/x-www-form-urlencoded
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
grant_type=client_credentials
scope=https://graph.microsoft.com/.default

Common Issues

  • Admin consent not granted
  • Incorrect scope
  • Mixing Microsoft Graph and SharePoint APIs
  • Expired client secret
     

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Didn't find what you need?

Our friendly customer support team is here to help

Submit a Request

Looking for help or advice?

Reach out to our knowledgeable community of users.

Zingtree Community