Skip to content

Commit 26845aa

Browse files
committed
Fixed another postman reference
1 parent 4524cb3 commit 26845aa

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

articles/search/search-security-rbac.md

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ This approach assumes Visual Studio Code with a REST client extension.
232232
1. Paste in and then send a request that uses the variables you've specified. For the "Search Index Data Reader" role, you can send a query. You can use any [supported API version](/rest/api/searchservice/search-service-api-versions).
233233

234234
```http
235-
POST https://{{baseUrl}}/indexes/{{indexName}}/docs/search?api-version=2023-11-01 HTTP/1.1
235+
POST https://{{baseUrl}}/indexes/{{index-name}}/docs/search?api-version=2023-11-01 HTTP/1.1
236236
Content-type: application/json
237237
Authorization: Bearer {{token}}
238238
@@ -314,7 +314,7 @@ For more information on how to acquire a token for a specific environment, see [
314314

315315
## Test as current user
316316

317-
If you're already a Contributor or Owner of your search service, you can present a bearer token for your user identity for authentication to Azure AI Search. The following instructions explain how to set up a Postman collection to send requests as the current user.
317+
If you're already a Contributor or Owner of your search service, you can present a bearer token for your user identity for authentication to Azure AI Search.
318318

319319
1. Get a bearer token for the current user using the Azure CLI:
320320

@@ -328,29 +328,28 @@ If you're already a Contributor or Owner of your search service, you can present
328328
Get-AzAccessToken -ResourceUrl "https://graph.microsoft.com/"
329329
```
330330

331-
1. Start a new Postman collection and edit its properties. In the **Variables** tab, create the following variable:
332-
333-
| Variable | Description |
334-
|----------|-------------|
335-
| bearerToken | (copy-paste from get-access-token output on the command line) |
336-
337-
1. In the Authorization tab, select **Bearer Token** as the type.
338-
339-
1. In the **Token** field, specify the variable placeholder `{{bearerToken}}`.
331+
1. In a new text file in Visual Studio Code, paste in these variables:
340332

341-
1. Save the collection.
333+
```http
334+
@baseUrl = PASTE-YOUR-SEARCH-SERVICE-URL-HERE
335+
@index-name = PASTE-YOUR-INDEX-NAME-HERE
336+
@token = PASTE-YOUR-TOKEN-HERE
337+
```
342338

343-
1. Send a request to confirm access. Here's one that queries the hotels-quickstart index:
339+
1. Paste in and then send a request to confirm access. Here's one that queries the hotels-quickstart index
344340

345341
```http
346-
POST https://<service-name>.search.windows.net/indexes/hotels-quickstart/docs/search?api-version=2020-06-30
347-
{
348-
"queryType": "simple",
349-
"search": "motel",
350-
"filter": "",
351-
"select": "HotelName,Description,Category,Tags",
352-
"count": true
353-
}
342+
POST https://{{baseUrl}}/indexes/{{index-name}}/docs/search?api-version=2023-11-01 HTTP/1.1
343+
Content-type: application/json
344+
Authorization: Bearer {{token}}
345+
346+
{
347+
"queryType": "simple",
348+
"search": "motel",
349+
"filter": "",
350+
"select": "HotelName,Description,Category,Tags",
351+
"count": true
352+
}
354353
```
355354

356355
<a name="rbac-single-index"></a>

0 commit comments

Comments
 (0)