Azure Cosmos DB for PostgreSQL | User: postgres | Unable to login To assign Superuser role to another user.

AJITH KUMAR RAI 0 Reputation points
2024-09-18T13:06:43.0466667+00:00

Hi Team,

I created new Azure Cosmos DB for PostgreSQL and it created two default user accounts

  1. postgres
  2. citus

Now I want to login using postgres account pgadmin4 tool.

To assign SUPERUSER role to citus : **ALTER USER citus WITH SUPERUSER
**
only Superuser can add extension.

Could you please provide steps to login using postgres account.

tried Azure CLI and pgAdmin4 tool but no use unable to login.

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,631 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deepanshukatara-6769 9,195 Reputation points
    2024-09-18T13:23:43.8666667+00:00

    Hello, Welcome to MS Q&A

    Microsoft Entra ID integration works with standard PostgreSQL client tools like psql, which aren't Microsoft Entra ID aware and support only specifying the username and password when you're connecting to PostgreSQL. In such cases, the Microsoft Entra ID token is passed as the password.

    We tested the following clients:

    • psql command line: Use the PGPASSWORD variable to pass the token.
    • Other libpq-based clients: Examples include common application frameworks and object-relational mappers (ORMs).
    • pgAdmin: Clear Connect now at server creation.

    Use the following procedures to authenticate with Microsoft Entra ID as an Azure Cosmos DB for PostgreSQL user. You can follow along in Azure Cloud Shell, on an Azure virtual machine, or on your local machine.

    References:

    Please let me know if any questions

    Kindly accept answer if it helps

    Thanks

    Deepanshu


  2. Oury Ba-MSFT 19,101 Reputation points Microsoft Employee
    2024-09-24T18:08:29.49+00:00

    @AJITH KUMAR RAI Thank you for reaching out.

    This is by design. Some extensions, including pg_vector, require elevated permissions, so can’t be enabled using CREATE EXTENSION command in our managed service.

    To enable (and disabled) such extensions you’d need to use create_extension UDF we provide.

    For instance,

     SELECT create_extension('vector');

    General guidance for this is provided here.

    Regards,

    Oury


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.