Skip to content

Commit 8d3fdda

Browse files
Merge pull request #1759 from HeidiSteen/heidist-uuf
[azure search] corrections to keyless auth
2 parents c6edce8 + 0d424e8 commit 8d3fdda

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

articles/search/search-get-started-rbac.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ ms.author: heidist
77
ms.service: azure-ai-search
88

99
ms.topic: quickstart
10-
ms.date: 11/26/2024
10+
ms.date: 11/28/2024
1111
---
1212

1313
# Quickstart: Connect without keys
1414

15-
Configure Azure AI Search to use Microsoft Entra ID authentication and roles. Connect from your local system, running Jupyter notebooks, or using a REST client.
15+
Configure Azure AI Search to use Microsoft Entra ID authentication and role-based access control (RBAC). Connect from your local system using your personal identity, using Jupyter notebooks or a REST client to interact with your search service.
1616

17-
If you stepped through other quickstarts that connect using API keys, this quickstart shows you how to switch to identity-based authentication so that you can avoid hard-coded API keys in your example code.
17+
If you stepped through other quickstarts that connect using API keys, this quickstart shows you how to switch to identity-based authentication so that you can avoid hard-coded keys in your example code.
1818

1919
## Prerequisites
2020

@@ -24,43 +24,45 @@ If you stepped through other quickstarts that connect using API keys, this quick
2424

2525
- A command line tool, such as the [Azure CLI](/cli/azure/install-azure-cli).
2626

27-
## Step 1: Set up your Azure subscription and tenant
27+
## Step 1: Get your Azure subscription and tenant IDs
2828

2929
This step is necessary if you have more than one subscription or tenant.
3030

3131
1. Get the Azure subscription and tenant for your search service:
3232

33-
1. Sign into the Azure portal and navigate to your search service.
33+
1. Sign into the [Azure portal](https://portal.azure.com) and navigate to your search service.
3434

3535
1. Notice the subscription name and ID in **Overview** > **Essentials**.
3636

37-
1. Select the subscription name to view the parent management group (tenant ID).
37+
1. Select the subscription name to confirm the parent management group (tenant ID).
3838

3939
:::image type="content" source="media/search-get-started-rbac/select-subscription-name.png" lightbox="media/search-get-started-rbac/select-subscription-name.png" alt-text="Screenshot of the portal page providing the subscription name":::
4040

4141
1. Identify the active Azure subscription and tenant on your local device:
4242

4343
`az account show`
4444

45-
1. Set your Azure subscription to the subscription and tenant:
45+
1. If the active subscription is different from the one used by Azure AI Search, change the subscription ID. Next, sign in to Azure using the same tenant ID as Azure AI Search.
4646

4747
`az account set --subscription <your-subscription-id>`
4848

4949
`az login --tenant <your-tenant-id>`
5050

51-
1. Check your tenant ID:
51+
1. Verify your tenant ID.
5252

5353
`az account show --query tenantId --output tsv`
5454

55-
## Step 2: Configure Azure AI Search for Microsoft Entra ID authentication
55+
## Step 2: Configure Azure AI Search for RBAC
5656

57-
1. Sign in to the Azure portal and navigate to your Azure AI Search service.
57+
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your Azure AI Search service.
5858

5959
1. Enable role-based access control (RBAC):
6060

6161
1. Go to **Settings** > **Keys**.
6262

63-
1. Choose **Role-based control** or **Both** if you need time to transition clients to role-based access control1.
63+
1. Choose **Role-based control** or **Both** if you need time to transition clients to role-based access control.
64+
65+
If you choose **Role-based control**, make sure that you assign yourself all roles named in the next instruction or you won't be able to complete tasks in the portal or through a local client.
6466

6567
1. Assign roles in the Azure portal:
6668

@@ -70,10 +72,19 @@ This step is necessary if you have more than one subscription or tenant.
7072

7173
1. Select **+ Add** > **Add role assignment**.
7274

73-
1. Choose a role (Search Service Contributor, Search Index Data Contributor, Search Index Data Reader) and assign it to your Microsoft Entra user or group identity. These three roles provide the full set of permissions for creating, loading, and querying objects on Azure AI Search. For more information, see [Connect using roles](search-security-rbac.md).
75+
1. Choose a role (Search Service Contributor, Search Index Data Contributor, Search Index Data Reader) and assign it to your Microsoft Entra user or group identity.
76+
77+
Repeat for each role.
78+
79+
You need all three roles for creating, loading, and querying objects on Azure AI Search. For more information, see [Connect using roles](search-security-rbac.md).
80+
81+
> [!TIP]
82+
> Later, if you get authentication failure errors, recheck the settings in this section. There could be policies at the subscription or resource group level that override any API settings you specify.
7483
7584
## Step 3: Connect from your local system
7685

86+
If you haven't yet signed in to Azure, do so now with an `az login` command.
87+
7788
### Using Python and Jupyter notebooks
7889

7990
1. Install the Azure Identity and Azure Search libraries:
@@ -105,7 +116,7 @@ Several quickstarts and tutorials use a REST client, such as Visual Studio Code
105116

106117
1. Get a personal identity token:
107118

108-
`az account get-access-token --resource https://<your-search-service-name>.search.windows.net`
119+
`az account get-access-token --scope https://search.azure.com/.default`
109120

110121
1. Extract the token from the output:
111122

0 commit comments

Comments
 (0)