Azure Cosmos Postgresql issue with Role creation

Vipal Mehta 20 Reputation points
2024-08-23T08:53:50.2166667+00:00

Hi,

We are using Azure Cosmos Postgresql DB and we are experiencing issues with Role creation. We created a role from console as well as az cli using below command -

The command shows succeeded and the role is visible. However the same role is not visible on the Database where we logged in using psql as well as with PgAdmin tool.

It says Role does not exist, however the Azure portal displays the role as well as Azure cli command says success. Kindly advise if there are any issues with Role syncing from the portal/cli to the actual node. If so, how much time the role takes to reflect after succeeding.

User's imageUser's image

User's image

az cosmosdb postgres role create -n "testrole" --password "password" --cluster-name "test-cluster" -g "testGroup" --subscription "ffffffff-ffff-ffff-ffff-ffffffffffff"
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,643 questions
Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 11,206 Reputation points
    2024-08-23T11:59:40.03+00:00

    Hello Vipal Mehta,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having issues with role creation in Azure Cosmos DB for PostgreSQL.

    Hope you are not performing actions that might conflict with the role creation, such as creating or deleting child resources (databases, containers, etc.) before the role synchronization completes. Ensure the creation of the role completed and synchronized, also, check via the Azure portal, the Azure CLI and Database to confirm the role exist. Then, check out these links for more detailed steps about role creation: https://learn.microsoft.com/en-us/azure/cosmos-db/role-based-access-control and https://github.com/MicrosoftDocs/azure-docs/issues/114839.

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.