Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
Last active March 7, 2018 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/262c087f1e4fb4d6bfd3cf0db314c0f6 to your computer and use it in GitHub Desktop.
Save PlagueHO/262c087f1e4fb4d6bfd3cf0db314c0f6 to your computer and use it in GitHub Desktop.
Grant all access to the TestCollection in the TestDatabase for the user TestUserId in CosmosDB
$userId = 'TestUserId'
$resourcePath = Get-CosmosDbCollectionResourcePath -Database 'TestDatabase' -Id 'TestCollection'
New-CosmosDbPermission -Context $context -Id 'AccessTestCollection' -UserId $userId -PermissionMode All -Resource $resourcePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment