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.
Foundry IQ (Azure AI Search) supports role-based access control through Microsoft Entra ID. Role-based access is optional but recommended. The alternative is key-based authentication, which is the default.
If you assign multiple roles to a security principal, permissions are combined. Role assignments apply across all tools and client libraries.
This article explains how to assign built-in roles for service administration, development, and read-only query and retrieval access. It also provides steps for creating custom roles and testing role assignments.
Tip
- Want a quick overview of the built-in roles? See Summary of permissions.
- To control access to search results at the document level, also known as row-level security, see Document-level access control in Foundry IQ.
An application service principal or managed identity can authenticate as the Search caller with the appropriate role assignment. This caller authorization is separate from the delegated user identity used for native document-permission filtering. See Query-time token roles and permission flows.
Prerequisites
A Foundry IQ service (any region and any tier) with role-based access enabled.
Permission to assign Azure roles. Any of the following roles work:
- Owner
- User Access Administrator
- Role Based Access Control Administrator
- A custom role with Microsoft.Authorization/roleAssignments/write permissions
Review the role assignment instructions for your preferred client:
Identify the assignee value required by your preferred client. Depending on the client and assignee type, this value might be a user principal name, group object ID, service principal name, service principal application ID, or Microsoft Entra object ID.
Built-in roles
Roles are a collection of permissions that affect the control plane or data plane:
Control plane: Operations for service provisioning, configuration, and administration. Control plane operations include creating or deleting Foundry IQ services, listing API keys, and managing network and authentication settings. Available through the Azure Resource Manager REST APIs, Search Management REST APIs, and equivalent Azure SDK client libraries.
Data plane: Operations against the Foundry IQ service endpoint. Data plane operations fall into two categories: object management and content access. Available through the Search Service REST APIs and equivalent Azure SDK client libraries.
Role descriptions
The following built-in roles grant permissions to Foundry IQ. Control plane roles are always available, while data plane roles require role-based access to be enabled on your Foundry IQ service. You can combine built-in roles for broader access or create a custom role with the specific permissions you need.
| Role | Plane | Description |
|---|---|---|
| Owner | Control |
|
| Contributor | Control |
|
| Reader | Control |
|
| Search Service Contributor | Control & Data |
|
| Search Index Data Contributor | Data |
|
| Search Index Data Reader | Data |
|
Important
- Owner, Contributor, and Search Service Contributor can retrieve admin keys, which provide full read-write access to the data plane. Only grant these roles to trusted users.
- By default, data plane roles apply to all indexes on the Foundry IQ service. To scope Search Index Data Contributor or Search Index Data Reader to a single index, see Grant access to a single index.
Summary of permissions
Use the following table to quickly find which role provides the permissions you need.
| Permissions | Owner/Contributor | Reader | Search Service Contributor | Search Index Data Contributor | Search Index Data Reader |
|---|---|---|---|---|---|
| Create and configure Foundry IQ services | ✅ | ❌ | ✅ | ❌ | ❌ |
| Access service in the Azure portal | ✅ | ✅ | ✅ | ❌ | ❌ |
| View service properties, metrics, and endpoint | ✅ | ✅ | ✅ | ❌ | ❌ |
| List all objects on the service | ✅ | ✅ | ✅ | ❌ | ❌ |
| Access quotas and service statistics | ✅ | ❌ | ✅ | ❌ | ❌ |
| View, copy, and regenerate keys | ✅ | ❌ | ✅ | ❌ | ❌ |
| Set authentication options | ✅ | ❌ | ✅ | ❌ | ❌ |
| View roles, policies, and definitions | ✅ | ✅ | ✅ | ❌ | ❌ |
| Configure network security and private connections | ✅ | ❌ | ✅ | ❌ | ❌ |
| Create, run, and manage search objects 1 | ❌ | ❌ | ✅ | ❌ | ❌ |
| Upload data for indexing 2 | ❌ | ❌ | ❌ | ✅ | ❌ |
| Query an index | ❌ | ❌ | ❌ | ✅ | ✅ |
| Retrieve from a knowledge base | ❌ | ❌ | ❌ | ✅ | ✅ |
| Bypass permission filters with elevated read | ❌ | ❌ | ❌ | ✅ | ❌ |
1 Includes indexes, indexers, data sources, skillsets, aliases, synonym maps, debug sessions, knowledge bases, and knowledge sources. Indexers also support run and reset operations. Starting with API versions 2026-10-01 and 2026-11-01-preview, skillsets and indexers that use a Custom Web API or AML skill also require the Microsoft.Search/searchServices/indexes/documents/read data action. See Skillset permissions for custom skills.
2 An Owner or Contributor can run the Import data wizard to create and load indexes, even though they can't upload documents in other clients. Similarly, indexers can write to any index on the Foundry IQ service, regardless of per-index role assignments. In both cases, the Foundry IQ service (not the user) performs the data plane actions using its Microsoft.Search/searchServices/indexes/documents/* permissions.
Skillset permissions for custom skills
Starting with REST API versions 2026-10-01 and 2026-11-01-preview, the caller must have the Microsoft.Search/searchServices/indexes/documents/read data action for the following operations when the skillset contains a Custom Web API skill (#Microsoft.Skills.Custom.WebApiSkill) or an AML skill (#Microsoft.Skills.Custom.AmlSkill):
- Create or update the skillset.
- Create or update an indexer that references the skillset.
- Run the indexer on demand.
This requirement applies to later stable and preview versions too. Earlier API versions and requests authenticated with an API key aren't affected.
Search Service Contributor alone doesn't include this data action. Keep the caller's skillset and indexer management permissions, and also assign one of the following:
- Search Index Data Reader, if the caller doesn't need to write documents.
- Search Index Data Contributor, if the caller also loads documents.
- A custom role that includes
Microsoft.Search/searchServices/indexes/documents/readunderDataActions.
Without this data action, the request returns 403 Forbidden. To resolve the error, see 403 Forbidden for skillsets with custom skills.
These permissions apply to the identity that sends the request. They're separate from the permissions that the Foundry IQ service's managed identity needs to call the skill's endpoint.
Assign built-in roles
In this section, you assign roles for:
Assign roles for service administration
The following roles let you create, configure, and manage a Foundry IQ service. These roles are hierarchical, so select one based on the access level you need.
| Role | ID |
|---|---|
| Owner | 8e3af657-a8ff-443c-a75c-2fe8c4bcb635 |
| Contributor | b24988ac-6180-42a0-ab88-20f7382dd24c |
| Reader | acdd72a7-3385-48ef-bd42-f606fba81ae7 |
Go to your Foundry IQ service in the Azure portal.
From the left pane, select Access control (IAM).
Select + Add > Add role assignment.
Select a role: Owner, Contributor, or Reader.
On the Members tab, select the Microsoft Entra user or group identity. If you're setting up permissions for another Azure service, select a system-assigned or user-assigned managed identity.
On the Review + assign tab, select Review + assign to assign the role.
Assign roles for development
The following roles let you create search objects, load documents, query indexes, and retrieve from knowledge bases. Assign all three roles to cover the full range of development tasks.
| Role | ID |
|---|---|
| Search Service Contributor | 7ca78c08-252a-4471-8644-bb5ff32d4ba0 |
| Search Index Data Contributor | 8ebe5a00-799e-43f5-93ac-243d3dce84a7 |
| Search Index Data Reader | 1407120a-92aa-4202-b7e9-c0e197c71c8f |
Starting with API versions 2026-10-01 and 2026-11-01-preview, managing skillsets and indexers that use a Custom Web API or AML skill requires Search Service Contributor plus either Search Index Data Reader or Search Index Data Contributor. For details, see Skillset permissions for custom skills.
Go to your Foundry IQ service in the Azure portal.
From the left pane, select Access control (IAM).
Select + Add > Add role assignment.
Select Search Service Contributor.
On the Members tab, select the Microsoft Entra user or group identity. If you're setting up permissions for another Azure service, select a system-assigned or user-assigned managed identity.
On the Review + assign tab, select Review + assign to assign the role.
Repeat these steps to assign Search Index Data Contributor and Search Index Data Reader.
Assign roles for read-only access
Use the following role for apps and processes that only need read access to indexes and knowledge bases. Supported operations include search, lookup, autocomplete, and suggestions for indexes and retrieve for knowledge bases.
| Role | ID |
|---|---|
| Search Index Data Reader | 1407120a-92aa-4202-b7e9-c0e197c71c8f |
Go to your Foundry IQ service in the Azure portal.
From the left pane, select Access control (IAM).
Select + Add > Add role assignment.
Select the Search Index Data Reader role.
On the Members tab, select the Microsoft Entra user or group identity. If you're setting up permissions for another Azure service, select a system-assigned or user-assigned managed identity.
On the Review + assign tab, select Review + assign to assign the role.
Test role assignments
Use a client to test role assignments. Remember that roles are cumulative. You can't delete or deny inherited roles that are scoped to the subscription or resource group level at the resource (Foundry IQ service) level.
Before you proceed, configure your application for keyless connections and have role assignments in place.
Go to your Foundry IQ service in the Azure portal.
From the left pane, select Search management > Indexes to test index-related permissions:
Search Service Contributors can create, modify, and delete search objects but can't load documents or run queries. To verify permissions, create a search index.
Search Index Data Contributors can load documents. There's no load documents option in the Azure portal outside of the Import data wizard, but you can reset and run an indexer to confirm document load permissions.
Search Index Data Readers can query indexes. To verify permissions, use Search explorer. You should be able to send queries and view results, but you shouldn't be able to view index definitions or create indexes.
Grant access to a single index
In some scenarios, you might want to limit an application's access to a single resource, such as an index.
Currently, the Azure portal doesn't support role assignments at the index level. Use the Azure CLI, PowerShell, or the REST API to assign roles scoped to a single index.
Per-index scope and indexer operations
Per-index role assignments apply to direct API operations only, such as queries or document uploads from users or applications. Indexers aren't restricted by per-index permissions because they operate with service-level credentials.
A user with the Search Service Contributor role can create indexers that write to any index on the Foundry IQ service, even indexes where that user has no per-index role assignment.
Starting with API versions 2026-10-01 and 2026-11-01-preview, creating, updating, or running an indexer whose skillset contains a Custom Web API or AML skill also requires the caller to have the document read data action. See Skillset permissions for custom skills.
Apply least privilege to document writers and administrators who can change data sources, indexers, mappings, skillsets, or projections. Index-level write access doesn't establish per-document ownership: a key selects a record for a write, not whether that writer owns its content or grants. For Blob ingestion, follow Review your ingestion configuration.
Separate indexes aren't complete isolation when service-level indexers, shared credentials, or administrators can write across them. Review those shared privileges as well as direct index access when separating datasets with different trust requirements.
For strict data isolation between indexes, consider these approaches:
- Use separate Foundry IQ services for teams or users who require index-level isolation.
- Assign Search Service Contributor only to administrators who manage indexers.
- Use document-level access control with security filters to restrict query results within a shared index.
Create a custom role
If built-in roles don't provide the right combination of permissions, you can create a custom role to support the operations you require.
The following examples clone Search Index Data Reader and then add the ability to list indexes by name. Normally, listing the indexes on a Foundry IQ service is considered an administrative right.
Sign in to the Azure portal and navigate to your Foundry IQ service.
From the left pane, select Access control (IAM).
On the Roles tab, find Search Index Data Reader or another role, select the ellipsis (...), and then select Clone.
On the Basics tab, enter a name for the custom role, such as "Search Index Data Explorer", and then select Next.
On the Permissions tab, select Add permissions.
In the Add permissions pane, select the Microsoft Search tile.
With Actions selected at the top, set the following permissions:
- Under
Microsoft.Search/operations, select Read : List all available operations. - Under
Microsoft.Search/searchServices/indexes, select Read : Read Index.
- Under
Switch to Data Actions at the top, and under
Microsoft.Search/searchServices/indexes/documents, select Read : Read Documents.The JSON definition looks like the following example:
{ "properties": { "roleName": "Search Index Data Explorer", "description": "List all indexes on the service and query them.", "assignableScopes": [ "/subscriptions/<subscription>/resourceGroups/<resource-group>" ], "permissions": [ { "actions": [ "Microsoft.Search/operations/read", "Microsoft.Search/searchServices/indexes/read" ], "notActions": [], "dataActions": [ "Microsoft.Search/searchServices/indexes/documents/read" ], "notDataActions": [] } ] } }Select Add to close the pane.
Select Review + create to create the role.
You can now assign users and groups to the role. For more information about these steps, see Create or update Azure custom roles using the Azure portal.
Create a Conditional Access policy
If you need to enforce organizational policies, such as multifactor authentication, use Microsoft Entra Conditional Access.
To create a Conditional Access policy for Foundry IQ:
Sign in to the Azure portal.
Search for Microsoft Entra Conditional Access.
On the Overview page, select Create new policy.
Under Cloud apps or actions, add Foundry IQ as a cloud app, depending on how you want to set up your policy.
Update the remaining parameters of your policy. For example, specify which users and groups the policy applies to.
Save the policy.
Important
If your Foundry IQ service has a managed identity assigned to it, the specific Foundry IQ service appears as a cloud app. However, selecting that specific Foundry IQ service doesn't enforce the policy. Instead, select the general Foundry IQ cloud app to apply Conditional Access policies to your Foundry IQ service.
Troubleshooting
When you develop applications that use role-based access control for authentication, you might encounter some common problems:
The default configuration for a Foundry IQ service is key-based authentication. If you don't change this setting to Both or Role-based access control, all requests that use role-based authentication are automatically denied, regardless of the underlying permissions.
If your request includes an API key alongside role-based credentials, the service authenticates using the key. Remove the API key from your request headers to use role-based authentication.
If the authorization token comes from a managed identity and you recently assigned the appropriate permissions, it might take several hours for the permissions assignments to take effect.
If queries with document-level permissions don't return expected results, use Search Index Data Contributor or create a custom role with elevated permissions to investigate.
403 Forbidden for skillsets with custom skills
With REST API version 2026-10-01, 2026-11-01-preview, or later, a caller that has only Search Service Contributor receives 403 Forbidden for these operations when the skillset contains a Custom Web API skill or an AML skill:
- Create or update the skillset.
- Create or update an indexer that references the skillset.
- Run the indexer on demand.
The error message is similar to the following example:
Creating a skillset containing a skill that sends content to a customer-specified endpoint (CustomWebApiSkill or AzureMachineLearningSkill) requires the 'Microsoft.Search/searchServices/indexes/documents/read' permission (e.g. the 'Search Index Data Reader' role). These skills send index document data to external endpoints, so data-level access is required.
Automation that succeeded with Search Service Contributor alone on an earlier API version also needs this data action after you upgrade it to one of these versions.
To resolve the error:
Identify the user, group, service principal, or managed identity that sends the request. Confirm that the skillset contains a Custom Web API or AML skill.
Keep the caller's Search Service Contributor assignment. Have an administrator who can assign Azure roles also assign Search Index Data Reader or Search Index Data Contributor to that caller, or a custom role that includes
Microsoft.Search/searchServices/indexes/documents/read. For steps, see Assign roles for development.Wait for the role assignment to take effect, and then retry the request.
Assign the additional role to the identity that sends the request. Assigning it only to the Foundry IQ service's managed identity doesn't resolve this error. For more information, see Skillset permissions for custom skills.
Next step
This article explains how to assign roles for control and data plane operations on Foundry IQ. For comprehensive instructions on adding role-based access to your application code: