Create an indexed SharePoint knowledge source

Note

Foundry IQ (Azure AI Search) provides direct indexing and query APIs alongside higher-level knowledge source and knowledge base APIs for managed retrieval. Use the Azure portal, REST APIs, or Azure SDKs to configure these capabilities, or connect agents to knowledge bases in the Microsoft Foundry portal.

Important

For terms that apply when you connect to external data sources, see External data sources.

An indexed SharePoint knowledge source ingests SharePoint content into an agentic retrieval pipeline in Foundry IQ (Azure AI Search). It's generally available with the 2026-10-01 REST API. Knowledge sources are created independently, referenced in a knowledge base, and used as grounding data when the knowledge base is queried at runtime.

When you create an indexed SharePoint knowledge source, you specify a SharePoint connection string, models, and properties to automatically generate the following Foundry IQ objects:

  • A data source that points to SharePoint sites and uses the connection string unchanged. The generated data source follows the SharePoint indexer's TenantId rules.
  • A skillset that chunks and optionally vectorizes multimodal content.
  • An index that stores enriched content and meets the criteria for agentic retrieval.
  • An indexer that uses the previous objects to drive the indexing and enrichment pipeline.

The generated indexer conforms to the SharePoint in Microsoft 365 indexer, whose prerequisites, supported document formats, and limitations also apply to indexed SharePoint knowledge sources. For more information, see the SharePoint indexer documentation and indexer limits. If the generated skillset calls an external service, that skill's input and service limits also apply.

Use contentExtractionMode to select minimal or standard content extraction when you create the knowledge source. For how files, lists, and modern pages differ, see SharePoint content representations.

Usage support

Azure portal Microsoft Foundry portal .NET SDK Python SDK Java SDK JavaScript SDK REST API
✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️

The REST examples use the stable 2026-10-01 API. SDK examples retain the package requirements listed below; REST availability doesn't establish SDK package release status. Features labeled preview retain their independent status.

Prerequisites

  • The latest Azure.Search.Documents preview package: dotnet add package Azure.Search.Documents --prerelease

  • For keyless authentication, the Azure.Identity package: dotnet add package Azure.Identity

For REST Client, set these variables in your .http file. The resource-management examples later in this article use the same endpoint, API version, and knowledge-source name.

@search-url = https://<search-service-name>.search.windows.net
@api-version = 2026-10-01
@knowledge-source-name = my-indexed-sharepoint-ks
@knowledge-base-name = <your-knowledge-base-name>
@sharepoint-federated-connection-string = <your-federated-connection-string>
@aoai-endpoint = https://<resource-name>.openai.azure.com

Replace the connection-string placeholder with your configured federated connection string. Set aoai-endpoint to the Azure OpenAI resource that hosts your embedding deployment. In the creation request, replace embeddingModel.azureOpenAIParameters.resourceUri with {{aoai-endpoint}}, replace the sample deploymentId with your deployment name, and set modelName to the deployed model.

The deletion examples also use knowledge-base-name. Set it to the referencing knowledge base you intend to update or delete before running those examples.

Choose resource ownership

This article uses the knowledge-source API to manage ingestion and create the backing index. Configure source selection, content extraction, and other supported options on the knowledge source. Review the generated resources, but avoid editing them directly.

If you need to control the index schema or build a custom processing pipeline, configure a SharePoint indexer and connect its populated index through a search index knowledge source. For remote retrieval and custom-ingestion alternatives, see SharePoint architecture choices.

Plan topology for SharePoint group permissions

If your application needs SharePoint group permissions, evaluate its site scope before creating the knowledge source. Each generated index that uses a field marked with sharepointSiteUrl: true supports at most five distinct site-URL values. Writes for an additional site URL are rejected. The separate 100-URL query-time aggregation ceiling doesn't increase this limit. See SharePoint group permission site limits.

For a larger site scope, evaluate the following topology:

  1. Divide the site scope across separate indexed SharePoint knowledge sources so each generated index stays within the five-value limit. Preserve the required permission fields and originating-site context in every index and derived document.
  2. Assign the sources to a knowledge base within the maximum knowledge sources per knowledge base. For example, S1 supports up to 10 sources per knowledge base. Check your tier and service creation date rather than assuming this limit applies to every service.
  3. If all required sources don't fit in one knowledge base, consider multiple knowledge bases. Check the per-service limits for knowledge sources, knowledge bases, indexes, and indexers before choosing this topology.
  4. Implement application-level routing or orchestration for multiple knowledge bases. A retrieve request targets one knowledge base, not all knowledge bases on the service. Preserve the end user's permission context in each request and when combining results and citations.

Also check knowledge source selection during retrieval. The number of sources configured in a knowledge base and the number selected for a request are separate considerations.

Check for existing knowledge sources

A knowledge source is a top-level, reusable object. Knowing about existing knowledge sources is helpful for either reuse or naming new objects.

Run the following code to list knowledge sources by name and type.

// List knowledge sources by name and type
using Azure.Search.Documents.Indexes;

var indexClient = new SearchIndexClient(new Uri(searchEndpoint), credential);
var knowledgeSources = indexClient.GetKnowledgeSourcesAsync();

Console.WriteLine("Knowledge Sources:");

await foreach (var ks in knowledgeSources)
{
    Console.WriteLine($"  Name: {ks.Name}, Type: {ks.GetType().Name}");
}

Reference: SearchIndexClient

# List knowledge sources by name and type
from azure.core.credentials import AzureKeyCredential
from azure.search.documents.indexes import SearchIndexClient

index_client = SearchIndexClient(endpoint = "search_url", credential = AzureKeyCredential("api_key"))

for ks in index_client.list_knowledge_sources():
    print(f"  - {ks.name} ({ks.kind})")

Reference: SearchIndexClient

### List knowledge sources by name and type
GET {{search-url}}/knowledgesources?api-version={{api-version}}&$select=name,kind
Authorization: Bearer {{token}}

Reference: Knowledge Sources - List

You can also return a single knowledge source by name to review its JSON definition.

using Azure.Search.Documents.Indexes;
using System.Text.Json;

var indexClient = new SearchIndexClient(new Uri(searchEndpoint), credential);

// Specify the knowledge source name to retrieve
string ksNameToGet = "earth-knowledge-source";

// Get its definition
var knowledgeSourceResponse = await indexClient.GetKnowledgeSourceAsync(ksNameToGet);
var ks = knowledgeSourceResponse.Value;

// Serialize to JSON for display
var jsonOptions = new JsonSerializerOptions 
{ 
    WriteIndented = true,
    DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.Never
};
Console.WriteLine(JsonSerializer.Serialize(ks, ks.GetType(), jsonOptions));

Reference: SearchIndexClient

# Get a knowledge source definition
from azure.core.credentials import AzureKeyCredential
from azure.search.documents.indexes import SearchIndexClient
import json

index_client = SearchIndexClient(endpoint = "search_url", credential = AzureKeyCredential("api_key"))

ks = index_client.get_knowledge_source("knowledge_source_name")
print(json.dumps(ks.as_dict(), indent = 2))

Reference: SearchIndexClient

### Get a knowledge source definition
GET {{search-url}}/knowledgesources('{{knowledge-source-name}}')?api-version={{api-version}}
Authorization: Bearer {{token}}

Reference: Knowledge Sources - Get

The following response redacts sensitive values. Before reusing it to create another knowledge source, supply target connection settings and credentials or configure supported secretless authentication; redacted values aren't credentials.

{
  "name": "my-indexed-sharepoint-ks",
  "kind": "indexedSharePoint",
  "description": "A sample indexed SharePoint knowledge source",
  "encryptionKey": null,
  "indexedSharePointParameters": {
    "connectionString": "<redacted>",
    "containerName": "defaultSiteLibrary",
    "query": null,
    "ingestionParameters": {
      "disableImageVerbalization": false,
      "ingestionPermissionOptions": [],
      "contentExtractionMode": "minimal",
      "identity": null,
      "embeddingModel": {
        "kind": "azureOpenAI",
        "azureOpenAIParameters": {
          "resourceUri": "<redacted>",
          "deploymentId": "text-embedding-3-large",
          "modelName": "text-embedding-3-large",
          "authIdentity": null
        }
      },
      "chatCompletionModel": null,
      "ingestionSchedule": null,
      "aiServices": null
    },
    "createdResources": {
      "datasource": "my-indexed-sharepoint-ks-datasource",
      "indexer": "my-indexed-sharepoint-ks-indexer",
      "skillset": "my-indexed-sharepoint-ks-skillset",
      "index": "my-indexed-sharepoint-ks-index"
    }
  }
}

Create a knowledge source

By using REST API 2026-11-01-preview, embedding and chat ingestion models support Azure API Management (APIM) Premium v2 endpoints. Content Understanding extraction doesn't support APIM endpoints.

Run the following code to create an indexed SharePoint knowledge source.

The example selects the site's default document library. To select other libraries, lists, pages, or sites, configure containerName and query under indexedSharePointParameters. Follow the SharePoint content-selection options and cross-site selection requirements.

// Create an IndexedSharePoint knowledge source
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;
using Azure.Search.Documents.KnowledgeBases.Models;
using Azure.Identity;

var foundryEndpoint = "https://<foundry-resource>.services.ai.azure.com";
var indexClient = new SearchIndexClient(new Uri(searchEndpoint), new DefaultAzureCredential());

var chatCompletionParams = new AzureOpenAIVectorizerParameters
{
    ResourceUri = new Uri(foundryEndpoint),
    DeploymentName = aoaiGptDeployment,
    ModelName = aoaiGptModel
};

var embeddingParams = new AzureOpenAIVectorizerParameters
{
    ResourceUri = new Uri(foundryEndpoint),
    DeploymentName = aoaiEmbeddingDeployment,
    ModelName = aoaiEmbeddingModel
};

var ingestionParams = new KnowledgeSourceIngestionParameters
{
    NetworkAccessMode = KnowledgeSourceNetworkAccessMode.Public,
    DisableImageVerbalization = false,
    ChatCompletionModel = new KnowledgeBaseAzureOpenAIModel(azureOpenAIParameters: chatCompletionParams),
    EmbeddingModel = new KnowledgeSourceAzureOpenAIVectorizer
    {
        AzureOpenAIParameters = embeddingParams
    }
};

var sharePointParams = new IndexedSharePointKnowledgeSourceParameters(
    connectionString: sharePointConnectionString,
    containerName: "defaultSiteLibrary")
{
    IngestionParameters = ingestionParams
};

var knowledgeSource = new IndexedSharePointKnowledgeSource(
    name: "my-indexed-sharepoint-ks",
    indexedSharePointParameters: sharePointParams)
{
    Description = "A sample indexed SharePoint knowledge source."
};

await indexClient.CreateOrUpdateKnowledgeSourceAsync(knowledgeSource);
Console.WriteLine($"Knowledge source '{knowledgeSource.Name}' created or updated successfully.");

Reference: SearchIndexClient, IndexedSharePointKnowledgeSource

# Create an indexed SharePoint knowledge source
from azure.identity import DefaultAzureCredential
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents.indexes.models import IndexedSharePointKnowledgeSource, IndexedSharePointKnowledgeSourceParameters, KnowledgeBaseAzureOpenAIModel, AzureOpenAIVectorizerParameters, KnowledgeSourceContentExtractionMode
from azure.search.documents.knowledgebases.models import KnowledgeSourceIngestionParameters, KnowledgeSourceNetworkAccessMode, KnowledgeSourceAzureOpenAIVectorizer

foundry_endpoint = "https://<foundry-resource>.services.ai.azure.com"
index_client = SearchIndexClient(endpoint = "<search-endpoint>", credential = DefaultAzureCredential())

knowledge_source = IndexedSharePointKnowledgeSource(
    name = "my-indexed-sharepoint-ks",
    description = "A sample indexed SharePoint knowledge source.",
    encryption_key = None,
    indexed_share_point_parameters = IndexedSharePointKnowledgeSourceParameters(
        connection_string = "connection_string",
        container_name = "defaultSiteLibrary",
        query = None,
        ingestion_parameters = KnowledgeSourceIngestionParameters(
            network_access_mode = KnowledgeSourceNetworkAccessMode.PUBLIC,
            identity = None,
            disable_image_verbalization = False,
            chat_completion_model = KnowledgeBaseAzureOpenAIModel(
                azure_open_ai_parameters = AzureOpenAIVectorizerParameters(
                    resource_url = foundry_endpoint,
                    deployment_name = "<aoai-gpt-deployment>",
                    model_name = "<aoai-gpt-model>",
                )
            ),
            embedding_model = KnowledgeSourceAzureOpenAIVectorizer(
                azure_open_ai_parameters=AzureOpenAIVectorizerParameters(
                    resource_url = foundry_endpoint,
                    deployment_name = "<aoai-embedding-deployment>",
                    model_name = "<aoai-embedding-model>",
                )
            ),
            content_extraction_mode = KnowledgeSourceContentExtractionMode.MINIMAL,
            ingestion_schedule = None,
            ingestion_permission_options = None
        )
    )
)

index_client.create_or_update_knowledge_source(knowledge_source)
print(f"Knowledge source '{knowledge_source.name}' created or updated successfully.")

Reference: SearchIndexClient

### Create an indexed SharePoint knowledge source
PUT {{search-url}}/knowledgesources/{{knowledge-source-name}}?api-version={{api-version}}
Authorization: Bearer {{search-access-token}}
Content-Type: application/json

{
    "name": "{{knowledge-source-name}}",
    "kind": "indexedSharePoint",
    "description": "A sample indexed SharePoint knowledge source.",
    "encryptionKey": null,
    "indexedSharePointParameters": {
        "connectionString": "{{sharepoint-federated-connection-string}}",
        "containerName": "defaultSiteLibrary",
        "query": null,
        "ingestionParameters": {
            "networkAccessMode": "public",
            "identity": null,
            "embeddingModel": {
                "kind": "azureOpenAI",
                "azureOpenAIParameters": {
                    "deploymentId": "text-embedding-3-large",
                    "modelName": "text-embedding-3-large",
                    "resourceUri": "https://<foundry-resource>.services.ai.azure.com"
                }
            },
            "chatCompletionModel": null,
            "disableImageVerbalization": false,
            "ingestionSchedule": null,
            "ingestionPermissionOptions": [],
            "contentExtractionMode": "minimal"
        }
    }
}

Reference: Knowledge Sources - Create or Update

Configure standard extraction

Standard extraction uses Content Understanding for layout-aware parsing and semantic chunking of supported SharePoint documents, with optional image descriptions. It uses the Foundry resource and deployments described in Prerequisites.

In the creation or update request, configure indexedSharePointParameters.ingestionParameters:

  1. Set contentExtractionMode to standard and configure aiServices with your Foundry resource endpoint.
  2. Set ingestionPermissionOptions to ["userIds", "groupIds"] to preserve SharePoint document permissions.
  3. Configure chatCompletionModel with a supported model and deployment in that Foundry resource for image verbalization. Leave disableImageVerbalization set to false or omit it.
  4. Configure embeddingModel.azureOpenAIParameters with your Foundry resource endpoint in resourceUri, for example https://<embedding-resource>.services.ai.azure.com. Set deploymentId and modelName for your embedding deployment, and retain the required connection settings from the creation example.

The generated embedding skill sends Content Understanding's chunk content, including generated image descriptions, to that embedding endpoint before writing vectors to the index.

Search generates the data source, indexer, Content Understanding skillset, and secured chunk index. After ingestion succeeds, the knowledge source is ready to assign to a knowledge base.

Content Understanding semantic chunking and image descriptions are generally available in Search REST API 2026-10-01. Use an API version that also supports the SharePoint connector and permission features in your configuration.

Use files supported by both the SharePoint indexer and the Content Understanding skill. Don't apply the file-processing configuration to list items or site pages parsed as text.

Standard extraction incurs Content Understanding charges and, when image verbalization is enabled, model usage charges. For more information, see billing and image description controls.

For more control over skills, chunking, and secured projections, see Configure a SharePoint indexer and Content Understanding skillset.

Configure the ingestion schedule

Without a configured ingestion schedule, an indexed SharePoint knowledge source runs its generated indexer every 24 hours by default. To use a shorter recurring interval for permission refresh, set indexedSharePointParameters.ingestionParameters.ingestionSchedule when you create or update the knowledge source. Set its interval to an XSD duration, such as PT5M for five minutes, the minimum supported interval.

For schedule properties, see Schedule definition. Follow the SharePoint permission-refresh recommendation for timing limitations; the interval isn't a completion deadline or revocation SLA.

This knowledge-source default differs from a directly created indexer without a schedule, which runs on demand rather than on a recurring schedule.

Use automatic per-language analyzers

Automatic per-language analyzers are in preview. Follow the setup and verification steps in the following sections; you don't need to configure analyzers on the generated index yourself. For the distinction between managed and directly configured language analysis, see automatic per-language analyzers.

Starting with the 2026-08-01-preview API version, automatic per-language analyzers are available for blob, indexed OneLake, and indexed SharePoint knowledge sources. When enabled, Foundry IQ (Azure AI Search) detects each source document's language and automatically applies a matching Microsoft language analyzer. You don't specify an analyzer in the knowledge source definition or in a query.

To enable automatic per-language analyzers, set contentExtractionMode to minimal and configure ingestionParameters.aiServices in the knowledge source definition.

For keyless authentication, omit aiServices.apiKey and assign the Cognitive Services User role on your Microsoft Foundry resource to the managed identity of your Foundry IQ service. For key-based authentication, set aiServices.apiKey to a valid key for your Foundry resource.

The following languages are supported:

  • English
  • Japanese
  • French
  • Spanish
  • German
  • Dutch
  • Italian
  • Brazilian Portuguese
  • European Portuguese
  • Simplified Chinese
  • Traditional Chinese
  • Korean

For multilingual content, Foundry IQ selects an analyzer based on the predominant detected language. It uses the standard analyzer when the language is unsupported or uncertain.

When you enable automatic per-language analyzers, Foundry IQ adds language-specific content fields for every supported language to the generated index schema, whether or not your data contains documents in those languages. During ingestion, documents are routed to the appropriate language-specific field based on their detected language.

Unused language fields don't contain indexed content and have minimal storage impact, but they remain part of the index schema and count toward the index field limit. Consider the additional fields when you plan your index design, field count, and storage requirements. For more information, see Index limits and Estimate and manage capacity of a Foundry IQ service.

Language detection is billable after the free AI enrichment allocation. For more information, see Free enrichments.

After ingestion, verify language routing without editing the generated objects:

  1. Inspect the generated index schema. Confirm that language-specific fields have their matching analyzers, such as snippet_en with en.microsoft, and that snippet_default provides the standard-analyzer fallback.
  2. Confirm that the generated semantic configuration lists the language-specific content fields and snippet_default.
  3. Inspect indexed chunks for a document detected as a supported language. Each chunk's text belongs in the corresponding language field. Unsupported or uncertain detection routes text to snippet_default.
  4. Read content from the populated language or fallback field. In this mode, the generated schema doesn't include a separate snippet field.

If the schema or results don't match, review the activation settings above and indexer errors. These checks don't define an update or migration procedure for an existing generated index.

Check ingestion status

Run the following code to monitor ingestion progress and health, including the knowledge source kind and detailed indexing errors for knowledge sources that generate an indexer pipeline and populate a search index.

using Azure.Search.Documents.Indexes;
using System.Text.Json;

var indexClient = new SearchIndexClient(new Uri(searchEndpoint), new AzureKeyCredential(apiKey));

// Get knowledge source ingestion status
var statusResponse = await indexClient.GetKnowledgeSourceStatusAsync(knowledgeSourceName);
var status = statusResponse.Value;

// Serialize to JSON for display
var json = JsonSerializer.Serialize(status, new JsonSerializerOptions { WriteIndented = true });
Console.WriteLine(json);

Reference: SearchIndexClient

# Check knowledge source ingestion status
from azure.core.credentials import AzureKeyCredential
from azure.search.documents.indexes import SearchIndexClient
import json

index_client = SearchIndexClient(endpoint="search_url", credential=AzureKeyCredential("api_key"))

status = index_client.get_knowledge_source_status("knowledge_source_name")
print(json.dumps(status.as_dict(), indent=2))

Reference: SearchIndexClient

### Check knowledge source ingestion status
GET {{search-url}}/knowledgesources/{{knowledge-source-name}}/status?api-version={{api-version}}
Authorization: Bearer {{token}}
Content-Type: application/json 

Reference: Knowledge Sources - Get Status

A response for a request that includes ingestion parameters and is actively ingesting content might look like the following example.

{
  "kind": "azureBlob",
  "synchronizationStatus": "active",
  "synchronizationInterval": "1d",
  "currentSynchronizationState": {
    "startTime": "2026-04-10T19:30:00Z",
    "itemUpdatesProcessed": 1100,
    "itemsUpdatesFailed": 100,
    "itemsSkipped": 1100,
    "errors": [
      {
        "key": "Item id 1",
        "docURL": "https://contoso.blob.core.windows.net/contracts/2024/Q4/doc-00023.csv",
        "statusCode": 400,
        "componentName": "DocumentExtraction.AzureBlob.MyDataSource",
        "errorMessage": "Could not read the value of column 'foo' at index '0'.",
        "details": "The file could not be parsed.",
        "documentationLink": "https://go.microsoft.com/fwlink/?linkid=2049388"
      }
    ]
  },
  "lastSynchronizationState": {
    "status": "partialSuccess",
    "startTime": "2026-04-09T19:30:00Z",
    "endTime": "2026-04-09T19:40:01Z",
    "itemUpdatesProcessed": 1100,
    "itemsUpdatesFailed": 100,
    "itemsSkipped": 1100,
    "errors": null
  },
  "statistics": {
    "totalSynchronizations": 25,
    "averageSynchronizationDuration": "00:15:20",
    "averageItemsProcessedPerSynchronization": 500
  }
}

Note

The kind property and currentSynchronizationState.errors[] array with document-level error details are available starting with the 2026-04-01 API version. For earlier API versions, these fields aren't returned. The lastSynchronizationState.status field is also new in 2026-04-01.

After the first synchronization finishes, check that lastSynchronizationState.endTime has a value and itemsUpdatesFailed is 0. If items failed, inspect the reported errors and the generated indexer's execution history before querying the knowledge base.

Review the generated objects

When you create this knowledge source, Foundry IQ (Azure AI Search) automatically generates a data source, indexer, and index, plus a skillset when the ingestion pipeline requires one. The creation response lists each object under createdResources.

These objects are generated according to a fixed template, and their names are based on the name of the knowledge source. You can't change the object names. Avoid editing these objects directly, as changes can introduce errors or incompatibilities that break the indexer pipeline.

For eligible Blob, ADLS Gen2, and Azure SQL sources only, the interim networking override permits changing the generated indexer's execution environment. This exception doesn't apply to indexed SharePoint or OneLake, and doesn't permit other generated-object changes. Later knowledge-source updates or regeneration can overwrite the override.

You can use the Azure portal to validate object creation. The workflow is:

  1. Check the indexer for success or failure messages. Connection or quota errors appear here.

  2. Check the data source to verify the connection to your data store. The connection uses either a connection string or a managed identity, depending on how you configured the knowledge source.

  3. If a skillset is generated, check its enrichment and vectorization settings. SQL knowledge sources generate a skillset only when you specify embeddingColumns.

  4. Check the index to see how your content is indexed and exposed for retrieval, including which fields are searchable and filterable and which fields store vectors for similarity search. Use Search Explorer to run queries against the generated index.

Confirm that the generated data source selects the intended SharePoint sites and content. Check the populated index for a known source item, and then verify retrieval and its source citation through the knowledge base. Successful resource creation alone doesn't confirm that ingestion has completed.

Assign to a knowledge base

If you're satisfied with the knowledge source, add it to a knowledge base.

For any knowledge base that specifies an indexed SharePoint knowledge source, be sure to set includeReferenceSourceData to true. This step is necessary for pulling the source document URL into the citation.

Query a knowledge base

After you configure the knowledge base, call the retrieve action or MCP endpoint to query the knowledge source. Choose the configuration that matches your scenario.

Enforce document-level permissions

SharePoint ACL permission filtering is generally available with REST API 2026-10-01. For details, see Query-time ACL and RBAC enforcement.

To ingest explicit user and group assignments, set indexedSharePointParameters.ingestionParameters.ingestionPermissionOptions to ["userIds", "groupIds"]. Include the user's access token in the retrieve request as described in Query-time authorization.

Use the default extraction option (contentExtractionMode: "minimal") or Content Understanding-based standard extraction (contentExtractionMode: "standard") where supported. Every generated chunk retains the source item's permission metadata and source context. Document-level permissions don't support specialized customer-selected parsing modes. See Supported parsing and content extraction for permission ingestion. Configure these options on the knowledge source; don't change generated parser settings.

Choose authentication and permission options for the group types you need:

Authentication groupIds included Group permissions ingested
Federated authentication Yes Microsoft Entra and native SharePoint site groups.
Client secret Yes Microsoft Entra groups only.
Either method No No group ACL ingestion. Configure userIds separately for explicit user assignments.

Federated group support requires the Microsoft Graph and SharePoint permissions for your ACL scenario. In the generated index, sharePointConnectorAppRegistration.federatedCredentialId uses the selected managed identity's application ID, not the federated credential object's ID.

Inspect the generated objects before relying on permission-filtered retrieval:

  1. Confirm the generated data source's indexerPermissionOptions matches the requested user and group ingestion options.
  2. Confirm the index enables permissionFilterOption and has fields annotated with the requested permissionFilter values, plus the required metadata_spo_item_path source-path field. For existing records without populated paths, follow the backfill guidance; adding the field alone doesn't populate them.
  3. For federated groupIds, check sharePointConnectorAppRegistration, its application identifiers, and the field marked sharepointSiteUrl: true. Verify the site mapping uses each item's metadata_spo_site_url, including cross-site selections.
  4. Inspect the skillset projections for the source path, requested user and group ACLs, and applicable site URL on every chunk. Leave projection-generated keys and parent identity unmapped.
  5. Check indexer execution results, then inspect representative documents and chunks using ACL verification. Compare permitted and denied test-user results after ingestion or a permission refresh.

Use the SharePoint field and mapping requirements to distinguish source path, site context, and library versus asset and item identity.

The supported permission model includes inherited assignments and group nesting within five levels, subject to the site-level nested-resolution limit. Organization-wide sharing links ("People in your organization") aren't supported for SharePoint ACL ingestion or query-time permission enforcement. Sharing-link expiration enforcement isn't supported. Generated resources don't add expiration enforcement. A separate supported explicit grant is independent of a link's expiration.

This knowledge source evaluates a replicated subset of SharePoint permissions, with differences from SharePoint's permissions model and inherited connector limitations, including the Conditional Access limitation. For remote, indexed, and Push API tradeoffs, see Choose a retrieval approach for freshness. Permission updates follow the generated indexer's SharePoint synchronization behavior.

For missing, unexpected, or failed results from an indexed SharePoint permission query, see Troubleshoot SharePoint permission filtering.

For an existing knowledge source, you can't change the connection string and ingestion permission options in place. To change these settings:

  1. Create a replacement knowledge source with the required authentication, site grants, and permission options.
  2. Complete ingestion and inspect its generated objects using the checks in the previous steps.
  3. Verify permitted and denied user results before updating the knowledge base to use the replacement. Resetting or resynchronizing the old indexer doesn't change its knowledge source's permission options.

Surface document-embedded images

Image serving is in preview and requires a supported preview API.

To surface document-embedded images (such as diagrams or scans) in answer synthesis responses, configure assetStore on this knowledge source, and then enable image serving on the knowledge base. Image serving isn't supported when ingestionPermissionOptions is configured. For more information, see Surface document-embedded images in agentic retrieval (preview).

Delete a knowledge source

Before you can delete a knowledge source, you must delete any knowledge base that references it or update the knowledge base definition to remove the reference. For knowledge sources that generate an index and indexer pipeline, all generated objects are also deleted. However, if you used an existing index to create a knowledge source, your index isn't deleted.

If you try to delete a knowledge source that's in use, the action fails and returns a list of affected knowledge bases.

To delete a knowledge source:

  1. Get a list of all knowledge bases on your Foundry IQ service.

    using Azure.Search.Documents.Indexes;
    
    var indexClient = new SearchIndexClient(new Uri(searchEndpoint), credential);
    var knowledgeBases = indexClient.GetKnowledgeBasesAsync();
    
    Console.WriteLine("Knowledge Bases:");
    
    await foreach (var kb in knowledgeBases)
    {
        Console.WriteLine($"  - {kb.Name}");
    }
    

    Reference: SearchIndexClient

    An example response might look like the following:

     {
         "@odata.context": "https://my-search-service.search.windows.net/$metadata#knowledgebases(name)",
         "value": [
         {
             "name": "my-kb"
         },
         {
             "name": "my-kb-2"
         }
         ]
     }
    
  2. Get an individual knowledge base definition to check for knowledge source references.

    using Azure.Search.Documents.Indexes;
    using System.Text.Json;
    
    var indexClient = new SearchIndexClient(new Uri(searchEndpoint), credential);
    
    // Specify the knowledge base name to retrieve
    string kbNameToGet = "earth-knowledge-base";
    
    // Get a specific knowledge base definition
    var knowledgeBaseResponse = await indexClient.GetKnowledgeBaseAsync(kbNameToGet);
    var kb = knowledgeBaseResponse.Value;
    
    // Serialize to JSON for display
    string json = JsonSerializer.Serialize(kb, new JsonSerializerOptions { WriteIndented = true });
    Console.WriteLine(json);
    

    Reference: SearchIndexClient

    An example response might look like the following:

     {
       "Name": "earth-knowledge-base",
       "KnowledgeSources": [
         {
           "Name": "earth-knowledge-source"
         }
       ],
       "Models": [
         {}
       ],
       "RetrievalReasoningEffort": {},
       "OutputMode": {},
       "ETag": "\u00220x8DE278629D782B3\u0022",
       "EncryptionKey": null,
       "Description": null,
       "RetrievalInstructions": null,
       "AnswerInstructions": null
     }
    
  3. Either delete the knowledge base or, if you have multiple knowledge sources, update the knowledge base to remove the source. This example shows deletion.

    using Azure.Search.Documents.Indexes;
    var indexClient = new SearchIndexClient(new Uri(searchEndpoint), credential);
    
    await indexClient.DeleteKnowledgeBaseAsync(knowledgeBaseName);
    System.Console.WriteLine($"Knowledge base '{knowledgeBaseName}' deleted successfully.");
    

    Reference: SearchIndexClient

  4. Delete the knowledge source.

    await indexClient.DeleteKnowledgeSourceAsync(knowledgeSourceName);
    System.Console.WriteLine($"Knowledge source '{knowledgeSourceName}' deleted successfully.");
    

    Reference: SearchIndexClient

  1. Get a list of all knowledge bases on your Foundry IQ service.

    # Get knowledge bases
    from azure.core.credentials import AzureKeyCredential
    from azure.search.documents.indexes import SearchIndexClient
    
    index_client = SearchIndexClient(endpoint = "search_url", credential = AzureKeyCredential("api_key"))
    
    print("Knowledge Bases:")
    for kb in index_client.list_knowledge_bases():
        print(f"  - {kb.name}")
    

    Reference: SearchIndexClient

    An example response might look like the following:

     {
         "@odata.context": "https://my-search-service.search.windows.net/$metadata#knowledgebases(name)",
         "value": [
         {
             "name": "my-kb"
         },
         {
             "name": "my-kb-2"
         }
         ]
     }
    
  2. Get an individual knowledge base definition to check for knowledge source references.

    # Get a knowledge base definition
    from azure.core.credentials import AzureKeyCredential
    from azure.search.documents.indexes import SearchIndexClient
    
    index_client = SearchIndexClient(endpoint = "search_url", credential = AzureKeyCredential("api_key"))
    kb = index_client.get_knowledge_base("knowledge_base_name")
    print(kb)
    

    Reference: SearchIndexClient

    An example response might look like the following:

     {
       "name": "my-kb",
       "description": null,
       "retrievalInstructions": null,
       "answerInstructions": null,
       "outputMode": null,
       "knowledgeSources": [
         {
           "name": "my-blob-ks"
         }
       ],
       "models": [],
       "encryptionKey": null,
       "retrievalReasoningEffort": {
         "kind": "low"
       }
     }
    
  3. Either delete the knowledge base or, if you have multiple knowledge sources, update the knowledge base to remove the source. This example shows deletion.

    # Delete a knowledge base
    from azure.core.credentials import AzureKeyCredential 
    from azure.search.documents.indexes import SearchIndexClient
    
    index_client = SearchIndexClient(endpoint = "search_url", credential = AzureKeyCredential("api_key"))
    index_client.delete_knowledge_base("knowledge_base_name")
    print(f"Knowledge base deleted successfully.")
    

    Reference: SearchIndexClient

  4. Delete the knowledge source.

    # Delete a knowledge source
    from azure.core.credentials import AzureKeyCredential 
    from azure.search.documents.indexes import SearchIndexClient
    
    index_client = SearchIndexClient(endpoint = "search_url", credential = AzureKeyCredential("api_key"))
    index_client.delete_knowledge_source("knowledge_source_name")
    print(f"Knowledge source deleted successfully.")
    

    Reference: SearchIndexClient

  1. Get a list of all knowledge bases on your Foundry IQ service.

    ### Get knowledge bases
    GET {{search-url}}/knowledgebases?api-version={{api-version}}&$select=name
    Authorization: Bearer {{token}}
    

    Reference: Knowledge Bases - List

    An example response might look like the following:

     {
         "@odata.context": "https://my-search-service.search.windows.net/$metadata#knowledgebases(name)",
         "value": [
         {
             "name": "my-kb"
         },
         {
             "name": "my-kb-2"
         }
         ]
     }
    
  2. Get an individual knowledge base definition to check for knowledge source references.

    ### Get a knowledge base definition
    GET {{search-url}}/knowledgebases('{{knowledge-base-name}}')?api-version={{api-version}}
    Authorization: Bearer {{token}}
    

    Reference: Knowledge Bases - Get

    An example response might look like the following:

     {
       "name": "my-kb",
       "description": null,
       "retrievalInstructions": null,
       "answerInstructions": null,
       "outputMode": null,
       "knowledgeSources": [
         {
           "name": "my-blob-ks"
         }
       ],
       "models": [],
       "encryptionKey": null,
       "retrievalReasoningEffort": {
         "kind": "low"
       }
     }
    
  3. Either delete the knowledge base or, if you have multiple knowledge sources, update the knowledge base to remove the source. This example shows deletion.

    ### Delete a knowledge base
    DELETE {{search-url}}/knowledgebases('{{knowledge-base-name}}')?api-version={{api-version}}
    Authorization: Bearer {{token}}
    

    Reference: Knowledge Bases - Delete

  4. Delete the knowledge source.

    ### Delete a knowledge source
    DELETE {{search-url}}/knowledgesources('{{knowledge-source-name}}')?api-version={{api-version}}
    Authorization: Bearer {{token}}
    

    Reference: Knowledge Sources - Delete

Known errors

The generated SharePoint data source and indexer use the same Microsoft Entra tenant validation and authentication behavior as directly configured SharePoint indexers. For tenant-related failures, review the generated indexer's status and execution history, and then follow the Invalid AAD tenant remediation.

For other authentication, connectivity, or permission failures, identify the failing connection. Distinguish access to the Foundry IQ service, SharePoint ingestion, query-time permission resolution, and calls to model or Foundry endpoints.