SharePoint
Scan SharePoint sites and document libraries for exposed secrets
The SharePoint Integration in the Praetorian Guard Platform (PGP)
The SharePoint integration in PGP provides continuous scanning of your organization's SharePoint sites and document libraries to detect exposed secrets such as API keys, tokens, passwords, and other sensitive information. PGP connects to SharePoint through the Microsoft Graph API using an Entra (Azure AD) app registration, discovers the sites in your tenant, and scans each site's default document library and modern site pages for security risks. On subsequent scans, PGP performs incremental checks — only re-scanning content that has changed since the last run.
Prerequisites
Before you begin, ensure you have:
- A Microsoft 365 tenant with SharePoint Online (Microsoft commercial cloud; national/government clouds such as GCC High are not supported)
- Permission to create and grant admin consent for an Entra app registration (Global Administrator or Application Administrator)
- Access to your PGP account
Creating an App Registration in Microsoft Entra
- Sign in to the Microsoft Entra admin center and go to Identity → Applications → App registrations
- Click New registration, give it a descriptive name (e.g., "PGP Integration"), and register it
- Copy the Application (client) ID and the Directory (tenant) ID from the app's Overview page
- Under Certificates & secrets, click New client secret, add a description and expiry, then copy the secret Value immediately — it will not be shown again
- Under API permissions, add the following Microsoft Graph application permissions and grant admin consent:
Sites.Read.AllFiles.Read.All
Note: Application permissions (not delegated) are required so PGP can scan without an interactive user session. Admin consent must be granted for the permissions to take effect.
Configuring the Integration in PGP
- In PGP, navigate to the Integrations page
- Find and click on SharePoint under the "SaaS Security" section
- Provide the following details:
- Tenant ID — Your Microsoft 365 tenant domain or GUID (e.g.,
contoso.onmicrosoft.comor a tenant GUID) - Client ID — The Application (client) ID from your Entra app registration
- Client Secret — The client secret Value you created
- Tenant ID — Your Microsoft 365 tenant domain or GUID (e.g.,
- Click Connect to establish the integration
Once configured, PGP will discover the SharePoint sites in your tenant and scan them for exposed secrets.
Note: PGP scans each site's default document library and its modern site pages. Within document libraries, text-based files (plain text, source code, configuration, JSON, XML) up to 1 MB are scanned; binary formats such as Office documents and PDFs are not.
Verifying the Connection
To verify that your connection is working:
- Navigate to Assets in PGP
- Look for
sharepoint:siteassets — each discovered site appears as an asset named after the site - Check the Integrations page to confirm the SharePoint connection status
Remediating Exposed Secrets
SharePoint retains file version history, so a secret that appears in a document may also exist in one or more previous versions of that file.
To fully eliminate the exposure:
- Remove the secret from the current version of the file
- Delete or purge every prior file version that still contains the secret
- Rotate the affected credential to invalidate any copies that may have already been captured
Until every historical version is cleaned, the secret should be treated as compromised.
Troubleshooting
Common issues and solutions:
- Unable to Connect — Verify the Tenant ID, Client ID, and Client Secret are correct and the secret has not expired
- Authorization / Consent Errors — Confirm the
Sites.Read.AllandFiles.Read.Allapplication permissions were added and admin consent was granted - No Sites Discovered — Ensure the app has tenant-wide read access and that the sites exist in the target tenant
- Expired Secret — Client secrets expire; create a new secret in Entra and update the connection
If you continue to experience issues, contact PGP Support.
Managing Your Connection
To manage your SharePoint connection:
- In PGP, navigate to the Integrations page
- Find your SharePoint connection
- Use the options menu (⋮) to update the stored credential (Refresh Token) or remove the connection (Disconnect)
Additional Resources
- Microsoft — Register an application with the Microsoft identity platform
- Microsoft Graph — SharePoint sites API
Need help? Contact our support team for assistance.