Created
December 21, 2021 02:38
-
-
Save anishi1222/0c5c609316301e1652a44e94a357d275 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resourceGroupName='<myResourceGroup>' | |
accountName='<myCosmosAccount>' | |
readOnlyRoleDefinitionId = '<roleDefinitionId of MyReadOnlyRole>' | |
ROprincipalId = '<Managed Identity Object ID for Function App, the app will be assigned to MyReadOnlyRole.>' | |
az cosmosdb sql role assignment create -a $accountName -g $resourceGroupName -s "/" -p $ROprincipalId -d $readOnlyRoleDefinitionId | |
readWriteRoleDefinitionId = '<roleDefinitionId of MyReadWriteRole>' | |
RWprincipalId = '<Managed Identity Object ID for Function App, the app will be assigned to MyReadWriteRole.>' | |
az cosmosdb sql role assignment create -a $accountName -g $resourceGroupName -s "/" -p $RWprincipalId -d $readWriteRoleDefinitionId |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment