Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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