Skip to content

Commit f84a9ba

Browse files
authored
Merge pull request #224 from charendt/patch-1
Update search-howto-managed-identities-cosmos-db.md
2 parents 4e048f1 + 566665e commit f84a9ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/search/search-howto-managed-identities-cosmos-db.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ $cosmosdb_acc_name = <cosmos db account name>
7474
$resource_group = <resource group name>
7575
$subsciption = <subscription ID>
7676
$system_assigned_principal = <Object (principal) ID for the search service's system/user assigned identity>
77-
$readOnlyRoleDefinitionId = "00000000-0000-0000-0000-00000000000"
78-
$scope=$(az cosmosdb show --name $cosmosdbname --resource-group $resourcegroup --query id --output tsv)
77+
$readOnlyRoleDefinitionId = "00000000-0000-0000-0000-000000000001"
78+
$scope=$(az cosmosdb show --name $cosmosdb_acc_name --resource-group $resource_group --query id --output tsv)
7979
```
8080

8181
Define a role assignment for the system-assigned identity:
8282

8383
```azurecli
84-
az cosmosdb sql role assignment create --account-name $cosmosdbname --resource-group $resourcegroup --role-definition-id $readOnlyRoleDefinitionId --principal-id $sys_principal --scope $scope
84+
az cosmosdb sql role assignment create --account-name $cosmosdb_acc_name --resource-group $resource_group --role-definition-id $readOnlyRoleDefinitionId --principal-id $system_assigned_principal --scope $scope
8585
```
8686

8787
For more information, see [Use data plane role-based access control with Azure Cosmos DB for NoSQL](/azure/cosmos-db/nosql/security/how-to-grant-data-plane-role-based-access)

0 commit comments

Comments
 (0)