Skip to content

Commit 981029a

Browse files
committed
Tested AAD steps for apps and local testing
1 parent 1e17375 commit 981029a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

articles/search/search-howto-aad.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ It's a best practice to grant minimum permissions. If your application only need
8989

9090
1. Select **+ Add** > **Add role assignment**.
9191

92-
![Access control (IAM) page with Add role assignment menu open.](../../includes/role-based-access-control/media/add-role-assignment-menu-generic.png)
92+
:::image type="content" source="../../includes/role-based-access-control/media/add-role-assignment-menu-generic.png" alt-text="Screenshot of Access control (IAM) page with Add role assignment menu open." border="true":::
9393

9494
1. Select an applicable role:
9595

@@ -143,10 +143,18 @@ The following instructions reference an existing C# sample to demonstrate the co
143143
SearchClient srchclient = new SearchClient(serviceEndpoint, indexName, new DefaultAzureCredential());
144144
```
145145

146-
> [!NOTE]
147-
> User-assigned managed identities work only in Azure environments. If you run this code locally, `DefaultAzureCredential` will fall back to authenticating with your credentials. Make sure you've also given yourself the required access to the search service if you plan to run the code locally.
146+
### Local testing
147+
148+
User-assigned managed identities work only in Azure environments. If you run this code locally, `DefaultAzureCredential` will fall back to authenticating with your credentials. Make sure you've also given yourself the required access to the search service if you plan to run the code locally.
149+
150+
1. Make sure you have role assignments to run all of the operations in the quickstart sample. To both create and query an index, you'll need "Search Index Data Reader" and "Search Index Data Contributor".
148151

149-
The Azure.Identity documentation has more details about `DefaultAzureCredential` and using [Azure AD authentication with the Azure SDK for .NET](/dotnet/api/overview/azure/identity-readme). `DefaultAzureCredential` is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types.
152+
1. Go to **Tools** > **Options** > **Azure Service Authentication** to choose your Azure sign-on account.
153+
154+
You should now be able to run the project from Visual Studio on your local system, using role-based access control for authorization.
155+
156+
> [!NOTE]
157+
> The Azure.Identity documentation has more details about `DefaultAzureCredential` and using [Azure AD authentication with the Azure SDK for .NET](/dotnet/api/overview/azure/identity-readme). `DefaultAzureCredential` is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types.
150158
151159
### [**REST API**](#tab/aad-rest)
152160

0 commit comments

Comments
 (0)