Skip to content

Commit 76c41d7

Browse files
committed
updates per feedback
1 parent f050cf4 commit 76c41d7

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

articles/cosmos-db/managed-identity-based-authentication.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: How to use system assigned managed identities (MSI) to access to Azure Cosmos DB data.
33
description: Learn how to configure an Azure AD system-assigned managed identity to access keys from Azure Cosmos DB.
4-
author: j-patrick
4+
author: j-patrick'
55
ms.service: cosmos-db
66
ms.topic: conceptual
77
ms.date: 03/20/2020
8-
ms.author: justipat
8+
ms.author: justipat'
99
ms.reviewer: sngun
1010

1111
---
@@ -32,7 +32,7 @@ In this step, you'll assign a system-assigned managed identity to your Azure Fun
3232
1. On the **Identity tab** switch **System Identity** to the "On" position. Be sure to click **Save**, and confirm you want to turn on System Identity. In the end the **System Identity** pane should look like this:
3333
![System Identity turned on](./media/managed-identity-based-authentication/identity-tab-system-managed-on.png)
3434

35-
## Grant the System-Assigned Managed Identity Access to your Azure Cosmos DB
35+
## Grant the System-Assigned Managed Identity Access to your'Azure Cosmos DB
3636

3737
In this step, you'll assign a role to the Azure Function's System-Assigned Managed Identity. Azure Cosmos DB has multiple built-in roles you can assign the System Identity too. For this exercise we'll just focus on two:
3838

@@ -55,13 +55,14 @@ For our scenario, we'll read the sale receipt documents, summarize them, and the
5555
1. Select the **+ Add** button, then **add role assignment**:
5656
![Add Role Assignment](./media/managed-identity-based-authentication/cosmos-db-iam-tab-select-add.png)
5757

58-
1. The **Role Assignment** panel opens to the right:
59-
![Add Role Assignment Pane](./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane.png)
58+
1. The **Add Role Assignment** panel opens to the right:
59+
<img src="./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane.png" width="50%">
6060

6161
* **Role** - Select **DocumentDB Account Contributor**
6262
* **Assign access to** - Under the Select **System-assigned managed identity** subsection, select **Function App**.
6363
* **Select** - The pane will be populated with all the function apps, in your subscription, that have a **Managed System Identity**. In our case I select the **SummaryService** function app:
64-
![Selection of Function App](./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane-filled.png)
64+
65+
<img src="./media/managed-identity-based-authentication/cosmos-db-iam-tab-add-role-pane-filled.png" width="50%">
6566

6667
1. Select the function app and click **Save**.
6768

@@ -71,6 +72,8 @@ Now we have a function app that has a system-assigned managed identity. That ide
7172

7273
We'll be using to get the Azure Cosmos DB Keys is the [List Keys API](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider/DatabaseAccounts/ListKeys).
7374

75+
> [!IMPORTANT]
76+
> If you want to [assign the **Cosmos DB Account Reader**](#grant-the-system-assigned-managed-identity-access-to-your-azure-cosmos-db) role, you will need to use the read only [List Keys api](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider/DatabaseAccounts/ListReadOnlyKeys). This will only populate the read only keys.
7477
7578
The api returns DatabaseAccountListKeysResult. This type isn't defined in the C# libraries. The code below is an implementation for this class. Add it to the solution:
7679
```csharp
@@ -183,12 +186,10 @@ namespace SummarizationService
183186
```
184187
You are now ready to [deploy your Azure Function.](../azure-functions/functions-create-first-function-vs-code.md)
185188

186-
> [!IMPORTANT]
187-
> If you want to [assign the **Cosmos DB Account Reader**](#grant-the-system-assigned-managed-identity-access-to-your-azure-cosmos-db) role, you will need to use the read only [List Keys api](https://docs.microsoft.com/rest/api/cosmos-db-resource-provider/DatabaseAccounts/ListReadOnlyKeys). This would only populate the read only keys on the DatabaseAccountListKeysResult class.
188-
189189
## Next steps
190190

191191
* [Certificate-based authentication with Azure Cosmos DB and Active Directory](certificate-based-authentication.md)
192192
* [Secure Azure Cosmos keys using Azure Key Vault](access-secrets-from-keyvault.md)
193193

194194
* [Security baseline for Azure Cosmos DB](security-baseline.md)
195+
'
-1.29 KB
Loading
-22.6 KB
Loading

0 commit comments

Comments
 (0)