Skip to main content

Crawl restrictions

Control which SharePoint sites and content Glean indexes.

  • Use Greenlist restrictions to allow crawling only for content that you specify.
  • Use Redlist restrictions to prevent Glean from crawling content that you specify.
Restriction TypeGreenlistRedlistDetails
Time-based Restrictions✅❌Restrict crawling to include/exclude content created/modified/viewed after a certain date.
Identity-based Restrictions✅❌Restrict crawling to include/exclude content created/modified/viewed by specific users or a specific group (plus public content).
Content-based Restrictions✅❌Restrict crawling to include/exclude specific content, documents, messages, or objects.
info

This page describes indexing restrictions. For live-result restrictions, see Set up real-time access for SharePoint.

Supported restrictions​

RestrictionGreenlistRedlistDetails
Date✅❌Restrict crawling to only content created/modified/viewed after a specific date.
Site✅✅Restrict crawling to include/exclude specific SharePoint sites.
note

For Group restrictions when using Azure AD/Entra ID, the Object ID of the AD Group must be provided, and NOT the Group name. For example:

7c77a355-c78c-6362-a195-d2428d285107

Limitations​

Date​

  • This restriction cannot currently be applied in the Admin UI.
  • Time-based restrictions do NOT speed up crawling as content is often not returned from vendor APIs ordered by date.
  • Some vendor APIs stop returning viewed dates ~4-5 months in the past for specific types of content.

Entra ID Group​

  • This restriction cannot currently be applied in the Admin UI.
  • Public content, despite being accessible to all users in SharePoint, will only be viewable in Glean to users in this group.

Define site URL rules​

Use a site allowlist to limit indexing to matching sites and a denylist to exclude sites. These rules select sites for indexing, not individual files or folders.

Wildcard availability

Wildcard rules require enablement for your deployment. Confirm availability and the supported configuration process before changing site rules. Contact Glean Support.

Choose exact URLs or patterns​

Use complete https:// site URLs under a SharePoint domain configured for your connector. For exact entries, omit the trailing slash. Use site URLs, not document links, page URLs, or personal OneDrive URLs.

When wildcard matching is enabled, a single trailing * matches zero or more characters after the URL prefix. The wildcard must appear in the URL path: https://example.sharepoint.com/* is valid, but https://example.sharepoint.com* is not.

The tenant-root wildcard has a narrower match. See Match tenant-root subsites.

Exact URLs and wildcard patterns can appear in the same list. An exact parent-site URL does not include its subsites. Each subsite needs its own exact entry or a matching pattern.

The following examples describe indexing matches when wildcard rules are enabled. Replace example.sharepoint.com with your configured SharePoint domain.

RuleMatching sites
https://example.sharepoint.com/sites/project-aOnly /sites/project-a, not its subsites.
https://example.sharepoint.com/sites/project-*Sites whose URLs start with /sites/project-, including matching subsites such as /sites/project-a/planning.
https://example.sharepoint.com/sites/project-a/*Subsites under /sites/project-a, not the parent itself. Add the parent's exact URL to include it.

Glean does not support regular expressions, wildcards in the middle of a rule, multiple wildcards, query parameters, or URL fragments. For example, do not use /sites/*/project or /sites/project-**.

Apply rule precedence​

Glean evaluates the rules as follows:

  • A matching denylist rule takes precedence over an allowlist rule.
  • With a non-empty allowlist, a site must match at least one allowlist entry.
  • An empty allowlist does not limit site selection. Denylist rules and other indexing restrictions still apply.

Match tenant-root subsites​

The pattern https://example.sharepoint.com/* matches immediate subsites of the tenant root, such as https://example.sharepoint.com/engineering. It does not match the tenant root itself, deeper subsites such as /engineering/backend, or site collections under /sites or /teams.

To match sites under those managed paths, use https://example.sharepoint.com/sites/* or https://example.sharepoint.com/teams/*. These are ordinary prefix patterns, so they also match deeper subsites.

Preserve existing rules

Switching to wildcard matching uses separate allowlists and denylists. Preserve required exact-URL entries and exclusions in those lists. Glean does not combine the active pattern lists with the previous exact-URL lists.

Apply restrictions​

Manage the site allowlist through Inclusion rules and the denylist through Exclusion rules in the Admin console. Contact Glean Support for restrictions that don't have a control in the Admin console.

The list editor shows either Site URLs or Site URL patterns, never both. It shows Site URL patterns when the o365sharepoint.crawl.enableWhitelistedSiteUrlPatterns flag is enabled, and Site URLs otherwise.

The field label identifies which values you can enter:

  • Site URLs accepts exact site URLs, not wildcard patterns. If Upload CSV appears, you can replace the list with a file.
  • Site URL patterns accepts exact site URLs and supported trailing-wildcard patterns. Pattern lists don't support CSV upload. See Choose exact URLs or patterns.

The list editor prompts you to press Enter to add entries. If your connector still shows the previous comma-separated fields without that prompt, enter exact site URLs and click Save instead of following the list-editing steps.

Edit site rules​

To add or remove entries in the list editor:

  1. Open your SharePoint connector in the Admin console.
  2. Under Data access (optional), click Inclusion rules or Exclusion rules. In the previous setup, open Manage data or Manage data (optional) and expand the rule section.
  3. Enter values that match the field label. Separate multiple entries with commas and press Enter to add them to the list. Glean checks the pattern format when you press Enter and displays detected errors inline, before you click Save. Correct rejected entries and press Enter again.
  4. Review the entries marked Unsaved. To remove an entry, click Delete. To restore a saved entry marked Deleted, click Undo before saving.
  5. Click Save to save manual additions and deletions. Pressing Enter alone doesn't save them.
  6. After saving, follow the confirmation message's instructions to request a crawl.

If saving reports an invalid entry, delete it, add a corrected value, and click Save again. During pilot setup, keep at least one entry in the inclusion list.

Replace an exact-URL list with a CSV file​

Use Upload CSV to replace an inclusion or exclusion list. Prepare a CSV file of up to 10 MB with one site URL per row and no header row. Include the complete list you want to keep, not just new entries. Add each required subsite explicitly, and don't include personal OneDrive URLs.

CSV upload replaces the list

In Manage data and Data access (optional), a successful upload replaces the selected saved list immediately and discards unsaved edits to that list. The upload doesn't wait for Save and doesn't replace the other list.

Don't upload an empty file unless you intend to clear the selected list. An empty inclusion list doesn't limit site selection, while exclusion rules and other indexing restrictions still apply.

In the pilot setup form, uploading a CSV file replaces the pending list instead. Submit the setup form to save the replacement. The form requires at least one inclusion entry.

To upload the replacement list:

  1. Open the Site URLs list under Inclusion rules or Exclusion rules.
  2. Click Upload CSV and select your file.
  3. Review any validation errors. A CSV parsing error leaves the saved list unchanged. Correct the file and select it again before uploading.
  4. Click Upload. Wait for the confirmation that Glean has replaced the list, then click Done. If the upload reports an error, review the message and use Upload new file to retry with a corrected file.

Review the resulting list before making further changes. Saving rules or uploading a file doesn't confirm that a crawl has completed.

SharePoint search visibility​

Glean normally honors SharePoint's search-visibility settings for sites, lists, and document libraries. The site-level Allow this site to appear in search results setting corresponds to NoCrawl.

If you explicitly add a site's exact URL to the site allowlist, Glean can index content from that site even when this setting is No. When wildcard matching is enabled, a matching allowlist pattern provides the same site-level indexing exception. An empty allowlist does not override this setting. If the site matches an exact URL or wildcard pattern in the denylist, Glean excludes it from indexing.

This exception applies to indexing. It does not change the SharePoint setting, override list or library search visibility, or grant application permissions or user access. Content must still meet other indexing requirements.

Exclude with Purview sensitivity labels​

Exclude SharePoint and OneDrive items from indexing based on their Microsoft Purview sensitivity labels. These exclusions don't apply to Data fetching (real-time access). Label-excluded content can still appear in real-time results if the user has access to it in Microsoft 365. See Restrict O365 content via sensitivity labels.

Understand protected files that return encrypted content​

If SharePoint returns a protected file as encrypted content, Glean can't extract readable text from the file during the crawl. The file's text content isn't indexed.

This behavior is separate from Purview sensitivity-label exclusions. Purview exclusions skip items with selected labels, while protected files are unreadable to the crawler even when their label isn't excluded.

Exclude draft content​

By default, Glean keeps the latest available published version of supported SharePoint content searchable while authors work on updates. The unpublished changes do not appear in Glean.

For example, after an author publishes version 1.0 and creates draft version 1.1, Glean continues to show version 1.0.

Users can find the published content only if Glean can verify their SharePoint access.

Glean also excludes items whose version history contains no available published version.

This behavior does not apply to classic web part pages with a published version and a newer draft. A SharePoint API limitation prevents Glean from retrieving the published version's web part content, so Glean cannot index the page while the newer version remains a draft.

What counts as draft content​

Glean treats a SharePoint page, list item, or drive item as draft when any of these conditions is true:

  • Minor version — The item's latest version is a minor (draft) version (for example, 1.1 or 0.3).
  • Checked out — The item is currently checked out by a user for editing.
  • Pending moderation — The item has a non-approved moderation status (for example, pending or rejected) in a list or library that has content approval enabled.

Items that have never been published (version below 1.0) are excluded entirely and are not indexed.

Troubleshooting missing SharePoint pages or list items​

If a SharePoint page or list item does not appear in Glean, verify its status in SharePoint.

For supported items with an available published version, check that the user has access. You don't need to publish unfinished edits to keep that version searchable.

For items that have never been published, or classic web part pages with a newer draft, complete the applicable publishing steps when the changes are ready:

  1. Publish the item — If the item is in a draft or minor version, publish a major version.
  2. Check in the item — If the item is checked out, check it back in so the published version is available. An admin can also cancel the checkout if another user checked the item out.
  3. Approve pending moderation — If the list or library uses content approval, approve the item so it moves to an approved state.

If published content is still missing, contact Glean Support.