Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
These features and functionality are part of the 2026-05-01-preview REST API. The 2026-05-01-preview is licensed to you as part of your Azure subscription and is subject to the terms applicable to "Previews" in the Microsoft Product Terms, the Microsoft Products and Services Data Protection Addendum ("DPA"), and the Supplemental Terms of Use for Microsoft Azure Previews.
The 2026-05-01-preview supports connections to other Microsoft services and third-party services. Use of these services is subject to their respective terms and might result in data processing or storage outside of the Azure compliance boundary, as well as data flowing into the Azure compliance boundary.
When you connect to Fabric IQ, you might incur costs, and data might be sent outside the Azure compliance boundary and processed according to the applicable service terms and data handling policies. It's your responsibility to manage whether your data will flow outside of your organization's compliance and geographic boundaries and any related implications, and that appropriate permissions, boundaries, and approvals are provisioned.
You're responsible for carefully reviewing and testing applications you build in the context of your specific use cases and making all appropriate decisions and customizations. This includes implementing your own responsible AI mitigations, such as metaprompts, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. For more information, see the Azure AI Search Transparency Note.
A Fabric Ontology knowledge source (preview) connects your Microsoft Fabric ontology to an agentic retrieval pipeline in Azure AI Search. Knowledge sources are created independently, referenced in a knowledge base, and used as grounding data when the knowledge base is queried at runtime.
Ontologies capture how your business defines its data, entities, and relationships, allowing agents to answer in business terms rather than reasoning over raw tables and columns.
Unlike indexed knowledge sources, Fabric Ontology knowledge sources query live data directly at retrieval time. No ingestion pipeline is needed. Queries require an end-user access token, which the retrieval engine uses to authenticate with Microsoft Fabric on the caller's behalf.
Usage support
| Azure portal | Microsoft Foundry portal | .NET SDK | Python SDK | Java SDK | JavaScript SDK | REST API |
|---|---|---|---|---|---|---|
| ❌ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Prerequisites
An Azure AI Search service in any region that provides agentic retrieval.
A Microsoft Fabric workspace with the required tenant settings for ontology and an ontology item.
Your search service and workspace must be in the same Microsoft Entra ID tenant.
Permissions to create knowledge sources. Configure keyless authentication with the Search Service Contributor role assigned to your user account (recommended) or use an API key.
- The latest
Azure.Search.Documentspreview package:dotnet add package Azure.Search.Documents --prerelease
- The latest
azure-search-documentspreview package:pip install --pre azure-search-documents
- The 2026-05-01-preview version of the Search Service REST APIs.
Data governance and compliance
Fabric IQ processes requests within the Microsoft Fabric compliance boundary for your workspace's region. The following commitments apply when you route agent queries through Fabric IQ.
Data residency
Fabric IQ retrieves and processes data within the region where your Microsoft Fabric workspace resides. Data doesn't cross regional boundaries during query execution. The applicable region and its compliance scope are determined by your workspace location. For the list of supported regions and the compliance frameworks each region satisfies, see Microsoft Fabric region availability.
Note
If your Azure AI Search service is in a different Azure region than your Fabric workspace, query results are returned cross-region. Review Microsoft Fabric region availability and your organization's data residency requirements before connecting a Fabric workspace in a different region.
Compliance certifications
Fabric IQ inherits Microsoft Fabric's compliance certifications for the workspace region. For compliance documentation, audit reports, and the frameworks applicable to each region, see Microsoft Fabric region availability.
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
api-key: {{api-key}}
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}}
api-key: {{api-key}}
Reference: Knowledge Sources - Get
The following JSON is an example response for a Fabric Ontology knowledge source.
{
"name": "my-fabric-ontology-ks",
"kind": "fabricOntology",
"description": "A Fabric Ontology knowledge source.",
"encryptionKey": null,
"fabricOntologyParameters": {
"workspaceId": "00000000-0000-0000-0000-000000000000",
"ontologyId": "00000000-0000-0000-0000-000000000001"
}
}
Create a knowledge source
Run the following code to create a Fabric Ontology knowledge source.
using Azure;
using Azure.Search.Documents.Indexes;
using Azure.Search.Documents.Indexes.Models;
Uri searchEndpoint = new Uri("<search-service-url>");
AzureKeyCredential credential = new AzureKeyCredential("<api-key>");
var indexClient = new SearchIndexClient(searchEndpoint, credential);
var fabricOntology = new FabricOntologyKnowledgeSource(
"<knowledge-source-name>",
new FabricOntologyKnowledgeSourceParameters("<fabric-workspace-id>", "<fabric-ontology-id>"))
{
Description = "A Fabric Ontology knowledge source."
};
await indexClient.CreateOrUpdateKnowledgeSourceAsync(fabricOntology);
Reference: SearchIndexClient
from azure.core.credentials import AzureKeyCredential
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents.indexes.models import (
FabricOntologyKnowledgeSource,
FabricOntologyKnowledgeSourceParameters,
)
index_client = SearchIndexClient(
endpoint="<search-service-url>",
credential=AzureKeyCredential("<api-key>")
)
knowledge_source = FabricOntologyKnowledgeSource(
name="<knowledge-source-name>",
description="A Fabric Ontology knowledge source.",
fabric_ontology_parameters=FabricOntologyKnowledgeSourceParameters(
workspace_id="<fabric-workspace-id>",
ontology_id="<fabric-ontology-id>"
)
)
index_client.create_or_update_knowledge_source(knowledge_source)
Reference: SearchIndexClient
### Create a Fabric Ontology knowledge source
PUT {{search-url}}/knowledgesources/my-fabric-ontology-ks?api-version=2026-05-01-preview
api-key: {{api-key}}
Content-Type: application/json
{
"name": "my-fabric-ontology-ks",
"kind": "fabricOntology",
"description": "A Fabric Ontology knowledge source.",
"fabricOntologyParameters": {
"workspaceId": "{fabric-workspace-id}",
"ontologyId": "{fabric-ontology-id}"
}
}
Reference: Knowledge Sources - Create or Update
Source-specific properties
The following properties apply to Fabric Ontology knowledge sources.
| Name | Description | Type | Editable | Required |
|---|---|---|---|---|
name |
The name of the knowledge source, which must be unique within the knowledge sources collection and follow the naming guidelines for objects in Azure AI Search. | String | No | Yes |
kind |
The kind of knowledge source, which is fabricOntology in this case. |
String | No | Yes |
description |
A description of the knowledge source. | String | Yes | No |
encryptionKey |
A customer-managed key to encrypt sensitive information in the knowledge source. | Object | Yes | No |
fabricOntologyParameters |
Parameters specific to the Fabric Ontology knowledge source: workspaceId and ontologyId. |
Object | No | Yes |
workspaceId |
The ID of the Microsoft Fabric workspace that contains the ontology item. Must be a valid GUID. | String | Yes | Yes |
ontologyId |
The ID of the ontology item to query. Must be a valid GUID. | String | Yes | Yes |
Assign to a knowledge base
If you're satisfied with the knowledge source, add it to a knowledge base.
Note
Fabric Ontology knowledge sources don't support the minimal retrieval reasoning effort. Use low or medium instead.
Query a knowledge base
After the knowledge base is configured, call the retrieve action or MCP endpoint to query Fabric Ontology content. This knowledge source has unique query-time permissions enforcement and response characteristics.
Enforce permissions at query time
Fabric Ontology knowledge sources use an on-behalf-of (OBO) token flow. You pass the end-user access token in the x-ms-query-source-authorization header on the retrieve request. The token must be scoped to the Azure AI Search audience (https://search.azure.com/.default). The retrieval engine exchanges this token for a Microsoft Fabric–scoped token and uses it to query the ontology item on behalf of the end user.
Standard Azure AI Search authentication is also required on the retrieve request. The x-ms-query-source-authorization token is passed separately and doesn't replace service authentication.
For instructions on passing the token, see Enforce permissions at query time.
Fabric Ontology–specific response fields
Fabric Ontology knowledge sources return results in the sourceData object of each references entry and query diagnostics in the activity array. sourceData contains:
fabricAnswer: The ontology's natural-language answer.fabricRawData: The structured data that grounded the answer, returned in CSV format.
The following example shows a retrieve response containing a Fabric Ontology knowledge source reference and its corresponding activity record. For broader guidance on interpreting retrieve responses, see Review the response.
Tip
To receive sourceData for references, set includeReferenceSourceData to true on the knowledge source entry within knowledgeSourceParams on the retrieve request.
{
"response": [
// ... Response omitted for brevity
],
"activity": [
{
"type": "fabricOntology",
"id": 1,
"knowledgeSourceName": "my-fabric-ontology-ks",
"queryTime": "2026-05-11T20:29:24Z",
"count": 1,
"fabricOntologyArguments": {
"search": "Which airlines operate domestic routes?"
}
},
{
// ... Additional activity records omitted for brevity
}
],
"references": [
{
"type": "fabricOntology",
"id": "0",
"activitySource": 1,
"sourceData": {
"fabricAnswer": "There are 3 airlines with domestic routes: Delta, United, and American.",
"fabricRawData": "Airline,Routes\nDelta,47\nUnited,38\nAmerican,29"
},
"rerankerScore": 0,
"workspaceId": "00000000-0000-0000-0000-000000000000",
"ontologyId": "00000000-0000-0000-0000-000000000001"
},
{
// ... Additional references omitted for brevity
}
]
}
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:
Get a list of all knowledge bases on your search 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" } ] }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 }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
Delete the knowledge source.
await indexClient.DeleteKnowledgeSourceAsync(knowledgeSourceName); System.Console.WriteLine($"Knowledge source '{knowledgeSourceName}' deleted successfully.");Reference: SearchIndexClient
Get a list of all knowledge bases on your search 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" } ] }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" } }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
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
Get a list of all knowledge bases on your search service.
### Get knowledge bases GET {{search-url}}/knowledgebases?api-version={{api-version}}&$select=name api-key: {{api-key}}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" } ] }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}} api-key: {{api-key}}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" } }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}} api-key: {{api-key}}Reference: Knowledge Bases - Delete
Delete the knowledge source.
### Delete a knowledge source DELETE {{search-url}}/knowledgesources/{{knowledge-source-name}}?api-version={{api-version}} api-key: {{api-key}}Reference: Knowledge Sources - Delete