Where to find Cosmos DB Endpoint and Key

jay 41 Reputation points
2022-10-20T16:08:59.267+00:00

I need to setup something and it requires the Cosmos DB Endpoint and Key.

How do I get this information on Cosmos DB?

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

Accepted answer
  1. GeethaThatipatri-MSFT 29,482 Reputation points Microsoft Employee
    2022-10-21T01:21:48.377+00:00

    @jay
    If you are using NoSQL API then you can find Endpoint under the settings select keys shown below.
    the URI is the endpoint, and you can either use the Primary or Secondary key. Those are read-write keys, there are read-only keys too.
    for Mongo API you can find the same in the connection string under the settings more details please refer to this document
    252791-image.png

    Please let me know if you need more information.
    Regards
    Geetha


1 additional answer

Sort by: Most helpful
  1. Mark Brown - MSFT 2,766 Reputation points Microsoft Employee
    2022-10-20T16:37:38.227+00:00

    You can find this most easily in the Azure portal in the Overview and Keys tab for the Cosmos DB account.

    You can also find these using PowerShell or az cli. Links to samples for both are below.

    Manage with az cli
    Manage with PowerShell


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.