Hello @Sharon !
So if you have followed the instructions are the Created Roles listed using the folowing :
List the role definitions you've created to fetch their IDs:
Azure CLICopy
az cosmosdb sql role definition list --account-name $accountName --resource-group $resourceGroupName
If these are listed you just need to assign them by creating Role Assignments:
Create role assignments
You can associate built-in or custom role definitions with your Microsoft Entra identities. When creating a role assignment, you need to provide:
The name of your Azure Cosmos DB account.
The resource group containing your account.
The ID of the role definition to assign.
The principal ID of the identity that the role definition should be assigned to.
The scope of the role assignment; supported scopes are:
-
/
(account-level) -
/dbs/<database-name>
(database-level) -
/dbs/<database-name>/colls/<container-name>
(container-level)
The scope must match or be a subscope of one of the role definition's assignable scopes.
Note
If you want to create a role assignment for a service principal, make sure to use its Object ID as found in the Enterprise applications section of the Microsoft Entra ID portal blade.
Note
The operations described are available in:
- Azure PowerShell: Az.CosmosDB version 1.2.0 or higher
- Azure CLI: version 2.24.0 or higher
The rest is on the same link you have posted
I recommend to pay attention to details as the process needs careful execution on the code
If possible list the steps you are follwing !
I hope this helps!
Kindly mark the answer as Accepted and Upvote in case it helped!
Regards