Issue
When following the documented steps to configure the SharePoint Loader in Pega Knowledge Buddy, the connection to SharePoint fails.
Errors indicate an authentication failure related to the SharePointAD_AuthProfile configuration.
Symptoms and Impact
The loader does not establish a successful connection, and the client suspects an instance-level misconfiguration.
Typical error observed:
Exception occurred while mapping incoming response to .response_GET Fail:InternalReason x-ms-diagnostics: 3000006; reason="Token contains invalid signature."; category="invalid_client" 401 Unauthorized
Steps to Reproduce
- Follow the SharePoint authentication configuration documented at Authenticating a SharePoint repository.
- Configure the SharePointAD_AuthProfile and upload the .pfx certificate to SharePointAD_Keystore.
- Override the SetSharePointProfile_Extn Data Transform with the target SharePoint site details.
- Manually run the D_SPOnlineGetFolderItems Data Page, passing the site name and folder path.
- Result: A 401 Unauthorized response is returned. The SharePoint content is not ingested.
- Expected : A list of files from the specified SharePoint folder is returned and ingestion proceeds.
Explanation
This is a product limitation. Pega Knowledge Buddy does not currently support Microsoft Graph API or Microsoft Entra ID (Entra-scoped) authentication for SharePoint content ingestion out of the box.
Pega Knowledge Buddy's SharePoint Loader integration uses SharePoint REST API v1 (/_api endpoints) for authentication and content ingestion. This relies on legacy SharePoint app-only permissions, which require tenant-wide SharePoint access configured via Azure / Entra ID app registration with a certificate (.pfx).
Some organizations configure their Azure / Entra ID environment to enforce Microsoft Graph with Sites.Selected scoped permissions — Microsoft's recommended least-privilege model.
In these environments:
- Legacy SharePoint REST (/_api) endpoints are not accessible via app-only tokens issued under a Graph-scoped registration.
- Direct SharePoint REST API calls return 401 Unauthorized regardless of the token passed.
- Access tokens generated via Graph-scoped app registrations are not accepted by the legacy REST endpoints.
Troubleshooting Steps
Determining whether the limitation applies to your environment
Before concluding that the product limitation is the cause, confirm that all standard configuration steps have been completed correctly. Work through the checklist below.
Configuration Checklist — Standard SharePoint Loader Setup
Step 1 — Upload the Certificate to the Keystore
- In Infinity Studio, click .
- Select SharePointAD_Keystore.
- Click Upload file and upload the .pfx certificate file obtained from your SharePoint / IT team.
- Click Save.
Step 2 — Set the Certificate Password in the Authentication Profile
- In Infinity Studio, click.
- Select SharePointAD_AuthProfile.
- Click Set password and enter the certificate password.
- Click Save.
Step 3 — Override and Configure the SetSharePointProfile_Extn Data Transform
- In the Infinity Studio header, search for and open the SetSharePointProfile_Extn Data Transform.
- On the Definition tab, populate the required SharePoint site configuration fields:
- Client ID
- SharePoint URL
- Tenant
- Verify that Steps 2 and 2.6 of the Data Transform are correctly populated — these are a common source of configuration failures.
- Save the rule to your implementation application.
Step 4 — Update the KnowledgeLoader:System Access Group
- In Infinity Studio, click
- Select KnowledgeLoader:System.
- In the Application section, update the application name to match your implementation application name and version.
- Click Save.
Step 5 — Enable Job Schedulers and Queue Processors
- Verify that the Job Scheduler Loader_SyncReferencesDocs is enabled.
- Verify that the Queue Processor ProcessReferenceDocs is enabled.
Step 6 — Validate Connectivity Using D_SPOnlineGetFolderItems
Manually execute the D_SPOnlineGetFolderItems data page, passing in the SiteName and folder path (resource identifier) values that match your Knowledge Loader resource configuration.
If this data page does not return a listing of documents from your SharePoint library, the authentication is not succeeding and further investigation is required at the SharePoint/Azure level.
Diagnosing Authentication Failures
If all configuration steps above are completed and the connection still fails, capture the following to determine root cause:
- A full Pega Tracer output (not screenshots) from a run of the Job Scheduler or a manual execution of D_SPOnlineGetFolderItems.
- The Operator ID and timestamp of the failed attempt for Pega Cloud log review.
- Test the access token independently using a REST client (such as Bruno or Postman) by calling the SharePoint REST endpoint directly: https://<your-tenant>.sharepoint.com/sites/<SiteName>/_api/Web/GetFolderByServerRelativeUrl('<folder-path>')?$expand=Files
If the REST client call returns 401 Unauthorized with a valid token, this confirms the issue is at the Azure / Entra ID permission model level, not within the Pega configuration.
If the Issue Is Confirmed as caused by Microsoft Graph permissions
If your organization's Entra ID enforces Sites.Selected scoped permissions via Microsoft Graph and legacy SharePoint REST (/_api) access is blocked at the tenant level, the standard Pega Knowledge Buddy SharePoint Loader will not function without changes to the SharePoint / Azure configuration.
Options available today:
- Use legacy SharePoint REST API access — Work with the client's SharePoint/Azure team to configure an app registration that allows access via SharePoint REST API v1 (/_api) with tenant-level SharePoint app-only permissions. This is the currently supported authentication model.
- Custom Microsoft Graph implementation —if your organization requires Sites.Selected or Microsoft Graph-scoped access and cannot enable legacy SharePoint REST authentication, a custom Microsoft Graph-based ingestion approach may be developed by extending the Knowledge Loader. This is outside the scope of product support and requires engagement with Pega Consulting Services.
Microsoft Graph support for the Knowledge Buddy SharePoint Loader is planned for a future release.
References
Setting up authentication and adding the component in UI Kit
Troubleshooting Knowledge component issues
Knowledge component feature comparison in Constellation and UI Kit