You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> +[Development or write-access to a search service](#assign-roles-for-development)
24
24
> +[Read-only access for queries](#assign-roles-for-read-only-queries)
25
-
> +[Custom access to a single index](#grant-access-to-a-single-index)
25
+
> +[Scoped access to a single index](#grant-access-to-a-single-index)
26
26
27
27
Per-user access over search results (sometimes referred to as *row-level security* or *document-level security*) isn't supported through role assignments. As a workaround, [create security filters](search-security-trimming-for-azure-search.md) that trim results by user identity, removing documents for which the requestor shouldn't have access. See this [Enterprise chat sample using RAG](/azure/developer/python/get-started-app-chat-template) for a demonstration.
28
28
@@ -38,13 +38,13 @@ Role-based access is optional, but recommended. The alternative is [key-based au
38
38
39
39
## Limitations
40
40
41
-
+ Role-based access control can increase the latency of some requests. Each unique combination of service resource (index, indexer, etc.) and service principal used on a request triggers an authorization check. These authorization checks can add up to 200 milliseconds of latency to a request.
41
+
+ Role-based access control can increase the latency of some requests. Each unique combination of service resource (index, indexer, etc.) and service principal triggers an authorization check. These authorization checks can add up to 200 milliseconds of latency per request.
42
42
43
43
+ In rare cases where requests originate from a high number of different service principals, all targeting different service resources (indexes, indexers, etc.), it's possible for the authorization checks to result in throttling. Throttling would only happen if hundreds of unique combinations of search service resource and service principal were used within a second.
44
44
45
45
## Enable role-based access for data plane operations
46
46
47
-
Role-based access control for service administration (control plane) is mandatory. Roles for data plane operations are optional. You must enable role-based access before you can assign Search Service Contributor, Search Index Data Contributor, or Search Index Data Reader roles.
47
+
Roles for service administration (control plane) is mandatory. Roles for data plane operations are optional. You must enable role-based access before you can assign Search Service Contributor, Search Index Data Contributor, or Search Index Data Reader roles for data operations.
48
48
49
49
In this step, configure your search service to recognize an **authorization** header on data plane requests that provide an OAuth2 access token.
50
50
@@ -110,7 +110,7 @@ When you enable role-based access control, the failure mode is "http401WithBeare
110
110
111
111
<a name = "built-in-roles-used-in-search"></a>
112
112
113
-
## Built-in role reference
113
+
## Built-in roles used in Azure AI Search
114
114
115
115
The following roles are built in. If these roles are insufficient, [create a custom role](#create-a-custom-role).
116
116
@@ -126,11 +126,19 @@ The following roles are built in. If these roles are insufficient, [create a cus
126
126
> [!NOTE]
127
127
> If you disable Azure role-based access, built-in roles for the control plane (Owner, Contributor, Reader) continue to be available. Disabling role-based access removes just the data-related permissions associated with those roles. If data plane roles are disabled, Search Service Contributor is equivalent to control-plane Contributor.
+ [Development or write-access to a search service](#assign-roles-for-development)
135
+
+ [Read-only access for queries](#assign-roles-for-read-only-queries)
136
+
137
+
### Assign roles for service administration
130
138
131
139
As a service administrator, you can create and configure a search service, and perform all control plane operations described in the [Management REST API](/rest/api/searchmanagement/) or equivalent client libraries. Depending on the role, you can also perform most data plane [Search REST API](/rest/api/searchservice/) tasks.
132
140
133
-
### [**Azure portal**](#tab/roles-portal-admin)
141
+
#### [**Azure portal**](#tab/roles-portal-admin)
134
142
135
143
1. Sign in to the [Azure portal](https://portal.azure.com).
136
144
@@ -150,7 +158,7 @@ As a service administrator, you can create and configure a search service, and p
150
158
151
159
1. On the **Review + assign** tab, select **Review + assign** to assign the role.
When you [use PowerShell to assign roles](../role-based-access-control/role-assignments-powershell.md), call [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment), providing the Azure user or group name, and the scope of the assignment.
Role assignments are global across the search service. To [scope permissions to a single index](#rbac-single-index), use PowerShell or the Azure CLI to create a custom role.
170
178
171
179
> [!IMPORTANT]
172
180
> If you configure role-based access for a service or index and you also provide an API key on the request, the search service uses the API key to authenticate.
173
181
174
-
### [**Azure portal**](#tab/roles-portal)
182
+
####[**Azure portal**](#tab/roles-portal)
175
183
176
184
1. Sign in to the [Azure portal](https://portal.azure.com).
177
185
@@ -195,7 +203,7 @@ Role assignments are global across the search service. To [scope permissions to
195
203
196
204
1. Repeat for the other roles. Most developers need all three.
197
205
198
-
### [**PowerShell**](#tab/roles-powershell)
206
+
####[**PowerShell**](#tab/roles-powershell)
199
207
200
208
When you [use PowerShell to assign roles](../role-based-access-control/role-assignments-powershell.md), call [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment), providing the Azure user or group name, and the scope of the assignment.
Use the Search Index Data Reader role for apps and processes that only need read-access to an index. This is a very specific role. It grants [GET or POST access](/rest/api/searchservice/documents) to the *documents collection of a search index* for search, autocomplete, and suggestions.
223
231
224
232
It doesn't support GET or LIST operations on an index or other top-level objects, or GET service statistics.
225
233
226
-
### [**Azure portal**](#tab/roles-portal-query)
234
+
####[**Azure portal**](#tab/roles-portal-query)
227
235
228
236
1. Sign in to the [Azure portal](https://portal.azure.com).
229
237
@@ -239,7 +247,7 @@ It doesn't support GET or LIST operations on an index or other top-level objects
239
247
240
248
1. On the **Review + assign** tab, select **Review + assign** to assign the role.
241
249
242
-
### [**PowerShell**](#tab/roles-powershell-query)
250
+
####[**PowerShell**](#tab/roles-powershell-query)
243
251
244
252
When [using PowerShell to assign roles](../role-based-access-control/role-assignments-powershell.md), call [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment), providing the Azure user or group name, and the scope of the assignment.
245
253
@@ -275,7 +283,7 @@ When [using PowerShell to assign roles](../role-based-access-control/role-assign
275
283
276
284
## Test role assignments
277
285
278
-
Use a client to test role assignments. Remember that roles are cumulative and inherited roles that are scoped to the subscription or resource group can't be deleted or denied at the resource (search service) level.
286
+
Use a client to test role assignments. Remember that roles are cumulative and inherited roles that are scoped to the subscription or resource group level can't be deleted or denied at the resource (search service) level.
279
287
280
288
Make sure that you [register your client application with Microsoft Entra ID](search-howto-aad.md) and have role assignments in place before testing access.
281
289
@@ -590,7 +598,7 @@ The PowerShell example shows the JSON syntax for creating a custom role that's a
590
598
591
599
## Disable API key authentication
592
600
593
-
Keyaccess, orlocalauthentication, canbedisabledonyourserviceifyou're using the Search Service Contributor, Search Index Data Contributor, and Search Index Data Reader roles and Microsoft Entra authentication. Disabling API keys causes the search service to refuse all data-related requests that pass an API key in the header.
601
+
Keyaccess, orlocalauthentication, canbedisabledonyourserviceifyou're using the built-in roles and Microsoft Entra authentication. Disabling API keys causes the search service to refuse all data-related requests that pass an API key in the header.
0 commit comments