Where to find Cosmos DB Endpoint and Key

jay 41 Reputation points

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,272 questions
0 comments No comments
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 24,197 Reputation points Microsoft Employee

    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

    Please let me know if you need more information.

1 additional answer

Sort by: Most helpful
  1. Mark Brown - MSFT 2,756 Reputation points Microsoft Employee

    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