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.
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.
After you create an index, you can use the Azure portal to access its statistics and definition or remove it from your Foundry IQ service.
After you create an index, you can use the Foundry IQ REST APIs to access its statistics and definition or remove it from your Foundry IQ service.
After you create an index, you can use the Azure SDK for .NET, Java, JavaScript, or Python to access its statistics and definition or remove it from your Foundry IQ service.
This article describes how to manage an index without affecting its content. For guidance on modifying an index definition, see Update or rebuild an index in Foundry IQ.
Limitations
The pricing tier of your Foundry IQ service determines the maximum number and size of your indexes, fields, and documents. For more information, see Service limits in Foundry IQ.
Otherwise, the following limitations apply to index management:
You can't take an index offline for maintenance. Indexes are always available for search operations.
You can't directly copy or duplicate an index within or across Foundry IQ services. The backup and restore samples for .NET and Python illustrate exporting definitions and documents. Before restoring a secret-bearing definition, follow Back up, restore, or clone an index. A sample export isn't a backup of credentials.
Handle secrets in index definitions
GET and LIST return resource definitions, not backups of credentials. Responses can redact or omit secrets needed to create another resource:
| Configuration | Read representation | Create or copy requirement |
|---|---|---|
Azure OpenAI vectorizer azureOpenAIParameters.apiKey |
A stored key is returned as <redacted>. |
Supply the target model resource's key, or configure supported managed-identity authentication and authorization. |
Custom Web API vectorizer customWebApiParameters.httpHeaders |
Each header value is returned as <redacted>. |
Supply the target endpoint's header values. |
Custom Web API vectorizer customWebApiParameters.uri |
Sensitive code and sig query values are redacted. |
Supply actual target query credentials, if required. |
<redacted> and <unchanged> aren't credentials. Only a supported update to the same existing resource and secret-bearing property can retain a stored value. A new index, renamed copy, or index in another service has no source secret to retain. Don't assume every vectorizer or API supports the same preservation behavior.
For Azure OpenAI vectorizers, omitting apiKey selects managed-identity authentication according to the vectorizer's authentication contract. Omission isn't a neutral "configure later" state. Configure the selected Search identity and its model-resource role assignments before using this mode.
Create an index with a model key
The following complete REST body creates an index using a text-embedding-3-small deployment. First, replace the resource and deployment values with your model configuration. Replace ${AZURE_OPENAI_API_KEY} with the key in your client before sending the request. This notation is client-side substitution, not service-side interpolation. Don't send the literal variable or store the substituted body in source control or logs.
Use your existing Search authentication to send POST https://<search-service>.search.windows.net/indexes?api-version=2026-10-01 with Content-Type: application/json:
{
"name": "model-index",
"fields": [
{ "name": "id", "type": "Edm.String", "key": true },
{
"name": "contentVector", "type": "Collection(Edm.Single)",
"searchable": true, "dimensions": 1536, "vectorSearchProfile": "model-profile"
}
],
"vectorSearch": {
"algorithms": [{ "name": "hnsw", "kind": "hnsw" }],
"profiles": [{
"name": "model-profile", "algorithm": "hnsw", "vectorizer": "model-vectorizer"
}],
"vectorizers": [{
"name": "model-vectorizer", "kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://contoso.openai.azure.com",
"deploymentId": "text-embedding-3-small",
"modelName": "text-embedding-3-small",
"apiKey": "${AZURE_OPENAI_API_KEY}"
}
}]
}
}
Reference: Indexes - Create.
Retain a key on a same-index update
After the preceding create succeeds with a real key, this complete body updates that same index's description while retaining its stored key. Send PUT https://<search-service>.search.windows.net/indexes/model-index?api-version=2026-10-01 with the same Search authentication and JSON content type.
This example keeps the vectorizer name, kind, resource URI, deployment, model, and authentication mode unchanged. The Azure OpenAI vectorizer accepts <redacted> or <unchanged> for its existing apiKey when it can match the existing vectorizer by name, kind, and resource URI. Don't treat omission as key retention. For a different model configuration or authentication mode, supply the intended credentials or configure supported managed identity explicitly.
{
"name": "model-index", "description": "Updated description",
"fields": [
{ "name": "id", "type": "Edm.String", "key": true },
{
"name": "contentVector", "type": "Collection(Edm.Single)",
"searchable": true, "dimensions": 1536, "vectorSearchProfile": "model-profile"
}
],
"vectorSearch": {
"algorithms": [{ "name": "hnsw", "kind": "hnsw" }],
"profiles": [{
"name": "model-profile", "algorithm": "hnsw", "vectorizer": "model-vectorizer"
}],
"vectorizers": [{
"name": "model-vectorizer", "kind": "azureOpenAI",
"azureOpenAIParameters": {
"resourceUri": "https://contoso.openai.azure.com",
"deploymentId": "text-embedding-3-small",
"modelName": "text-embedding-3-small",
"apiKey": "<redacted>"
}
}]
}
}
Reference: Indexes - Create Or Update.
Custom Web API vectorizers have different URI and header preservation rules. Those rules don't establish retention support for another vectorizer's properties.
Resolve credential validation errors
Create and update requests validate configuration before provisioning or applying the definition. Don't create an invalid resource with redaction placeholders and plan to repair it afterward.
If a request can't match a preservation placeholder to an existing secret, supply the actual target credential. Check the index name, vectorizer name and kind, endpoint, and property. For custom Web API query or header matching failures, follow the property-specific rules.
For a missing or empty Azure OpenAI key, check whether you intended to select managed identity. Verify the selected identity's authorization instead of assuming the key is retained. Don't combine incompatible authentication settings, such as a key and authIdentity. If changing endpoints, models, or authentication, obtain the target credentials or configure the target identity before resubmitting.
Back up, restore, or clone an index
Export definitions and retrievable documents separately from credentials. Definitions returned by GET or LIST can contain redaction placeholders or omit write-only properties. Review each resource type's contract; searching only for <redacted> isn't sufficient.
If a backup utility copies the GET response, changes only the index name, and submits it unchanged, adapt the restore step to supply target authentication first. Don't use that workflow unchanged for a secret-bearing index.
- Export nonsecret definitions and the documents you need to restore. Keep secrets out of schema backups, repositories, and logs.
- Inspect secret-bearing properties for redacted values and write-only omissions. Record the required credential sources without recording the credentials themselves.
- Map source dependencies to the target: model deployments, external connections, gateway configuration, endpoint policies, managed identities, role assignments, private connectivity, and customer-managed key access.
- Recreate target dependencies and authorization. A new Foundry IQ service's identity doesn't inherit the old identity's roles or network access.
- Obtain target keys, OAuth secrets, or other credentials from secure storage and inject them in the client before submitting each complete definition. Alternatively, configure an explicitly supported managed-identity mode. Don't carry source preservation placeholders into a create request.
- Create valid target resources in dependency order. A successful create or GET doesn't prove that an outbound model or custom API call succeeds.
- Validate target authentication, connectivity, and model or custom API behavior with a controlled request. Then load documents or run indexers and verify search results before switching applications.
For a region move, see Move your Foundry IQ service to another Azure region.
View all indexes
To view all your indexes:
Go to your Foundry IQ service in the Azure portal.
From the left pane, select Search management > Indexes.
By default, the indexes are sorted by name in ascending order. You can sort by Name, Document count, Vector index quota usage, or Total storage size by selecting the corresponding column header.
Use Indexes - List (REST API) to retrieve all indexes on your Foundry IQ service.
### List all indexes
GET https://[service name].search.windows.net/indexes?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
In the 2026-10-01 and 2026-11-01-preview REST APIs, list operations use server-side paging. When more results are available, the response includes a continuation URL. Follow each continuation URL until a response omits it. For the full pattern and examples, see Page through Foundry IQ list results.
Use your preferred Azure SDK to retrieve all indexes on your Foundry IQ service.
The Azure SDK for .NET provides GetIndexesAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// List all indexes
await foreach (var index in indexClient.GetIndexesAsync())
{
Console.WriteLine(index.Name);
}
List operations that use server-side paging return a continuation URL when more results are available. For the supported client library versions and examples, see Page through Foundry IQ list results.
View an index's statistics
On the index page, the portal provides the following statistics:
- Number of documents in the index.
- Storage space used by the index.
- Vector storage space used by the index.
- Maximum storage space for each index on your Foundry IQ service, which depends on your pricing tier. This value doesn't represent the total storage currently available to the index.
Use Indexes - Get Statistics (REST API) to retrieve the document count, storage usage, and vector storage usage of an index.
### Get index statistics
GET https://[service name].search.windows.net/indexes/[index name]/stats?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
Use your preferred Azure SDK to retrieve the document count, storage usage, and vector storage usage of an index.
The Azure SDK for .NET provides GetIndexStatisticsAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// Get index statistics
var statsResponse = await indexClient.GetIndexStatisticsAsync("[index name]");
var stats = statsResponse.Value;
Console.WriteLine($"Number of documents: {stats.DocumentCount:N0}");
Console.WriteLine($"Storage consumed by index: {stats.StorageSize:N0} bytes");
Console.WriteLine($"Storage consumed by vectors: {stats.VectorIndexSize:N0} bytes");
View an index's definition
Each index is defined by fields and optional components that enhance search capabilities, such as analyzers, normalizers, tokenizers, and synonym maps. This definition determines the index's structure and behavior during indexing and querying.
Use Indexes - Get (REST API) to retrieve the JSON definition of an index.
### Get index definition
GET https://[service name].search.windows.net/indexes/[index name]?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
Use your preferred Azure SDK to retrieve the JSON definition of an index.
The Azure SDK for .NET provides GetIndexAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// Get index definition
var index = await indexClient.GetIndexAsync("[index name]");
string indexJson = JsonSerializer.Serialize(index.Value, new JsonSerializerOptions { WriteIndented = true });
Console.WriteLine(indexJson);
Delete an index
Warning
You can't undo an index deletion. Before you proceed, make sure that you want to permanently remove the index and its documents from your Foundry IQ service.
On the index page, select Delete to initiate the deletion process.
The portal prompts you to confirm the deletion. After you select Delete, check your notifications to confirm that the deletion was successful.
Use Indexes - Delete (REST API) to permanently delete an index.
### Delete an index
DELETE https://[service name].search.windows.net/indexes/[index name]?api-version=[api version]
Content-Type: application/json
api-key: [admin key]
If the index was deleted successfully, you should receive an HTTP/1.1 204 No Content response.
Use your preferred Azure SDK to permanently delete an index.
The Azure SDK for .NET provides DeleteIndexAsync for this task.
// Create a SearchIndexClient
var endpoint = new Uri("[service endpoint]");
var credential = new AzureKeyCredential("[admin key]");
var indexClient = new SearchIndexClient(endpoint, credential);
// Delete the index
await indexClient.DeleteIndexAsync("[index name]");
Console.WriteLine("Index deleted successfully.");