Share via


Get started with AI in SharePoint (preview)

Note

This article applies to the preview version of Knowledge Agent in SharePoint.

Knowledge Agent isn't currently supported in Microsoft 365 Government—GCC, GCC High, DoD, Office 365 air-gapped cloud environments, or Microsoft 365 operated by 21Vianet.

Prerequisites

To use AI in SharePoint during Public Preview, all of the following requirements must be met.

  1. Microsoft 365 Copilot license: Users must have an active Microsoft 365 Copilot license. AI in SharePoint is included with this license during Public Preview and at General Availability. There is no additional cost.

  2. Opt-in to AI in SharePoint Public Preview via PowerShell: AI in SharePoint is off by default in all tenants until they opt in. A SharePoint Administrator (or Global Administrator) must explicitly enable AI in SharePoint for their users.

    • Opt‑in can be applied tenant‑wide or to specific sites using PowerShell.

    • Tenants that previously opted into the Knowledge Agent public preview do not need to opt in again.

  3. Enable Anthropic as an AI sub‑processor in the Microsoft Admin Center (new requirement): AI in SharePoint’s refreshed public preview uses an advanced reasoning model to support multi‑step planning and execution across SharePoint content. Tenant administrators must explicitly enable Anthropic as an AI sub‑processor for Microsoft Online Services in the Microsoft Admin Center.

Important

If Anthropic is not enabled, AI in SharePoint will not function, even if the tenant is opted into the Public Preview and users have Microsoft 365 Copilot licenses. Users will see an error message that says "This preview experience isn’t available because of your organization’s AI provider settings" when they try to execute a prompt. Admins who have previously opted in to AI in SharePoint but do not wish to enable Anthropic should opt out of the AI in SharePoint Public Preview to avoid a degraded end‑user experience.

AI capabilities in SharePoint aren't currently supported in Microsoft 365 Government - GCC, GCC High, DoD, or Office 365 air-gapped cloud environments.

Enable Anthropic as an AI Sub-Processor

Tenant administrators must explicitly allow Anthropic as an AI sub‑processor for Microsoft Online Services in the Microsoft Admin Center. For tenants based in the European Union or United Kingdom, Anthropic is disabled by default because it is currently excluded from EU data boundary commitments. To continue using AI in SharePoint during Public Preview, EU and UK tenant administrators must explicitly enable Anthropic in the Microsoft Admin Center.

  1. Go to the Microsoft 365 admin center and select Copilot -> Settings.

  2. On the Data access page, select AI providers operating as Microsoft sub-processors.

  3. On the AI providers operating as Microsoft subprocessors page, under Available sub-processors for your organization, select Enable Anthropic as a Microsoft sub-processor subject to the above terms.

Detailed instructions are here.

When Anthropic is enabled as a sub‑processor:

  • Your organization can use Anthropic models for Microsoft 365 Copilot experiences, including AI in SharePoint.

  • This setting may apply to other Copilot‑powered workloads across Microsoft 365, depending on feature availability and configuration.

Note

When Anthropic is enabled as a sub‑processor your organization can use Anthropic models for AI in SharePoint and other Microsoft 365 Copilot experiences. Tenant administrators should review this setting to ensure it aligns with their organization’s compliance, data handling, and regulatory requirements.

Enable AI in SharePoint

During preview, availability is configured using PowerShell. Opt‑in can be applied tenant‑wide or to specific sites using. Note that tenants that previously opted into the Knowledge Agent public preview do not need to opt in again.

You use existing KnowledgeAgent parameters in Set-SPOTenant to enable AI capabilities in SharePoint across all sites, selectively include sites, or selectively exclude sites.

For multi-geo tenants, the PowerShell script must be run in each geo to enable AI in SharePoint in that region.

Important

The underlying PowerShell parameter names (such as KnowledgeAgentScope) retain the preview naming for compatibility. Although the feature is now described as AI capabilities in SharePoint, the parameter names remain unchanged during preview.

The enablement process will change for general availability.

Use the SharePoint Online Management Shell version 16.0.26615.12013 or later to manage access to the AI capabilities preview for users with Copilot licenses. For setup instructions, see Get started with SharePoint Online Management Shell.

If you already have the SharePoint Online Management Shell installed, make sure you're running the latest version by running the following command in administrative mode: Update-Module -Name Microsoft.Online.SharePoint.PowerShell.

To resolve versioning errors

If you get the following error, it might indicate that you have multiple or conflicting versions of the SharePoint Online Management Shell installed:

Set-SPOTenant : A parameter cannot be found that matches parameter name 'KnowledgeAgentScope'

To resolve the issue, follow these steps:

  1. Remove the conflicting SharePoint modules by opening Add or remove programs, and searching for SharePoint. Uninstall any SharePoint admin modules you find.

  2. Check the installed modules by running the following command:

    Get-Module -Name *SharePoint* -ListAvailable

    If multiple versions are listed, remove them using:

    Uninstall-Module -Name <ModuleName>

  3. Manually delete the remaining modules. If you encounter exceptions during uninstall, use this command to locate the module path:

    (Get-Module -Name *SharePoint* -ListAvailable).Path

    Navigate to the parent folder and manually delete it.

  4. Restart PowerShell. Close the terminal and reopen it to clear any modules loaded in memory.

  5. Repeat cleanup. Repeat steps 2 and 3 until no SharePoint Online PowerShell modules remain.

  6. To install the latest SharePoint Online PowerShell module, run:

    Install-Module -Name Microsoft.Online.SharePoint.PowerShell

    Note

    To verify the installed version, use the following command:

    (Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable).Version

    If multiple versions appear, repeat the previous cleanup steps.

Instructions to opt in or out specific sites

KnowledgeAgentScope

  • Description: KnowledgeAgentScope allows administrators to control which SharePoint sites the Knowledge Agent feature is available on.

  • Valid values:

    • AllSites: Knowledge Agent is available on all sites.

    • IncludeSelectedSites: Knowledge Agent is available only on sites specified in KnowledgeAgentSelectedSitesList 

    • ExcludeSelectedSites: Knowledge Agent is available on all sites except those specified in KnowledgeAgentSelectedSitesList.

    • NoSites: Knowledge Agent isn't available on any sites. (This is the Default value.)

  • Note: Requires Microsoft 365 Copilot license.

KnowledgeAgentSelectedSitesList

  • Description: KnowledgeAgentSelectedSitesList allows administrators to pass a list of SharePoint site URLs to include or exclude from the Knowledge agent feature.

  • When KnowledgeAgentScope = ExcludeSelectedSites: the list is treated as sites to EXCLUDE (site opt-out list).

    • When  KnowledgeAgentScope = IncludeSelectedSites: the list is treated as sites to INCLUDE (site opt-in list).
  • By default, this overwrites any existing list with the provided list.

  • This parameter can only be called when KnowledgeAgentScope is set to IncludeSelectedSites or ExcludeSelectedSites.

  • The list of site URLs can't exceed 100 items.

  • Note: Requires Microsoft 365 Copilot license.

KnowledgeAgentSelectedSitesListOperation

  • Description: KnowledgeAgentSelectedSitesListOperation specifies the operation to perform on the Knowledge Agent feature's current sites list.

  • Valid values:

    • Overwrite: Overwrite the existing sites list (default).

    • Append: Append the input list of sites to the existing sites list.

    • Remove: Remove the input list of sites from the existing sites list.

  • Note: Calling this parameter without KnowledgeAgentSelectedSitesList has no effect.

Examples

Enable AI in SharePoint on all sites

# Connect to SharePoint Online admin center
Connect-SPOService https://yourtenant-admin.sharepoint.com

# Enable Knowledge Agent for all sites in the tenant
Set-SPOTenant -KnowledgeAgentScope AllSites

# Verify the configuration
Get-SPOTenant | Select-Object KnowledgeAgentScope

Enable AI in SharePoint on specified sites

# Connect to SharePoint Online admin center 
Connect-SPOService https://yourtenant-admin.sharepoint.com 

# Set Knowledge Agent to be available only on the included sites 
Set-SPOTenant -KnowledgeAgentScope IncludeSelectedSites 

# Specify sites to enable Knowledge Agent (initial inclusion list) 
Set-SPOTenant -KnowledgeAgentSelectedSitesList @("https://yourtenant.sharepoint.com/sites/site5", "https://yourtenant.sharepoint.com/sites/site7") 

# Add additional sites to the existing inclusion list (if needed) 
Set-SPOTenant -KnowledgeAgentSelectedSitesList @("https://yourtenant.sharepoint.com/sites/site3") -KnowledgeAgentSelectedSitesListOperation Append 

# Verify the inclusion configuration 
Get-SPOTenant | Select-Object KnowledgeAgentScope, KnowledgeAgentSelectedSitesList 

Enable AI in SharePoint on all sites except specified sites

# Connect to SharePoint Online admin center
Connect-SPOService https://yourtenant-admin.sharepoint.com

# Set Knowledge Agent to be available on all sites except selected sites
Set-SPOTenant -KnowledgeAgentScope ExcludeSelectedSites

# Specify sites to exclude from Knowledge Agent (initial exclusion list)
Set-SPOTenant -KnowledgeAgentSelectedSitesList @("https://yourtenant.sharepoint.com/sites/site1", "https://yourtenant.sharepoint.com/sites/site2")

# Add additional sites to the existing exclusion list (if needed)
Set-SPOTenant -KnowledgeAgentSelectedSitesList @("https://yourtenant.sharepoint.com/sites/site3") -KnowledgeAgentSelectedSitesListOperation Append

# Verify the exclusion configuration
Get-SPOTenant | Select-Object KnowledgeAgentScope, KnowledgeAgentSelectedSitesList

Disable AI in SharePoint

# Connect to SharePoint Online admin center
Connect-SPOService https://yourtenant-admin.sharepoint.com

# Disable Knowledge Agent for all sites in the tenant
Set-SPOTenant -KnowledgeAgentScope NoSites

# Verify Knowledge Agent is disabled
Get-SPOTenant | Select-Object KnowledgeAgentScope