File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ Create a role named *MyReadOnlyRole* that only contains read actions in a file n
217
217
``` azurecli
218
218
resourceGroupName='<myResourceGroup>'
219
219
accountName='<myCosmosAccount>'
220
- az cosmosdb sql role definition create --account-name $accountName --resource-group $resourceGroupName --body @role-definition-ro.json
220
+ az cosmosdb sql role definition create --account-name $accountName --resource-group $resourceGroupName --body @role-definition-ro.json
221
221
```
222
222
223
223
Create a role named * MyReadWriteRole* that contains all actions in a file named ** role-definition-rw.json** :
@@ -238,7 +238,7 @@ Create a role named *MyReadWriteRole* that contains all actions in a file named
238
238
```
239
239
240
240
``` azurecli
241
- az cosmosdb sql role definition create --account-name $accountName --resource-group $resourceGroupName --body @role-definition-rw.json
241
+ az cosmosdb sql role definition create --account-name $accountName --resource-group $resourceGroupName --body @role-definition-rw.json
242
242
```
243
243
244
244
List the role definitions you've created to fetch their IDs:
@@ -351,7 +351,7 @@ accountName='<myCosmosAccount>'
351
351
readOnlyRoleDefinitionId='<roleDefinitionId>' # as fetched above
352
352
# For Service Principals make sure to use the Object ID as found in the Enterprise applications section of the Azure Active Directory portal blade.
353
353
principalId='<aadPrincipalId>'
354
- az cosmosdb sql role assignment create --account-name $accountName --resource-group $resourceGroupName --scope "/" --principal-id $principalId --role-definition-id $readOnlyRoleDefinitionId
354
+ az cosmosdb sql role assignment create --account-name $accountName --resource-group $resourceGroupName --scope "/" --principal-id $principalId --role-definition-id $readOnlyRoleDefinitionId --principal-type "ServicePrincipal"
355
355
```
356
356
357
357
### Using Bicep/Azure Resource Manager templates
You can’t perform that action at this time.
0 commit comments