Closed tyler-suard-parker closed 3 months ago
@tyler-suard-parker It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!
@ManoharLakkoju-MSFT Sorry, here is the link: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/how-to-setup-rbac
@tyler-suard-parker Thanks for your feedback! We will investigate and update as appropriate.
Thank you for reaching out,
Unfortunately, this is the documentation GitHub repository, and we cannot troubleshoot issues, answer product questions, or provide technical support.
For technical support, please open a support ticket in the Azure portal. For questions about the product, please post them in Microsoft Q&A.
Looking briefly at your issue, it seems like you have an inline JSON encoding error. You can either use the @
syntax to read a JSON file, or do inline JSON in bash using this syntax:
az cosmosdb mongodb user definition create --account-name <account-name> --resource-group <resource-group-name> --body '{
"Id": "<database-name>.<username>",
"UserName": "<username>",
"Password": "<password>",
"DatabaseName": "<database-name>",
"CustomData": "created-by-docs",
"Mechanisms": "SCRAM-SHA-256",
"Roles": [
{
"Role": "read",
"Db": "<database-name>"
}
]
}'
One example you give: az cosmosdb mongodb user definition create --account-name --resource-group --body {\"Id\":\"test.myName\",\"UserName\":\"myName\",\"Password\":\"pass\",\"DatabaseName\":\"test\",\"CustomData\":\"Some_Random_Info\",\"Mechanisms\":\"SCRAM-SHA-256\",\"Roles\":[{\"Role\":\"My_Read_Only_Role101\",\"Db\":\"test\"}]}
I copied and pasted this, then changed the names to my correct ones. I pressed enter and I got this error message:
At line:1 char:135 ... ource-group my-resource-group --body {\"Id\":\"test.myName\",\"UserNa ... ~ Missing argument in parameter list. At line:1 char:338 ... hanisms\":\"SCRAM-SHA-256\",\"Roles\":[{\"Role\":\"dbOwner\",\"Db\":\ ... ~ Missing argument in parameter list.
FullyQualifiedErrorId : MissingArgument
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.