Where can I find CosmosDB Account Key?

An Phan Son 20 Reputation points
2024-07-30T10:06:05.0333333+00:00

I am currently working on a chatbot which utilizes Azure CosmosDB for MongoDB vCore, which I will deliver dataset into, in turn vectorize that data, through the backend send it up to the OpenAI. In order for all that to happen, I have to provide enough information of CosmosDB for the backend (I am using java by the way). Which consists of its URI (I believe is the connection string), its database and container (I believe is basically the setup/location in the database) and finally, its key (cosmos.key).

I have gone through quite ample amount of research on how to acquire the key and it seems to be a very simple part of the process. However I cannot seem to find the Key function of MongoDB. Here is what I did:User's image

User's image

User's image

At the 3rd screenshot, I assumed that most would already be able to access the key by now, but I cannot seem to find anything, connection strings tab only brings up the connection strings with nothing else. I believe it is either I have made a mistake somewhere or just incorrect input from the creation process.

Any help would be greatly appreciated.

Thanks,

An

Any help would be greatly appreciated

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,674 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Konstantinos Passadis 19,251 Reputation points MVP
    2024-07-30T21:01:44.2533333+00:00

    Hello @An Phan Son

    I understand you are looking for VCore Mongo API for Cosmos DB Key

    Are you sure it is not the admin password?

    try to change it if you don't know it please and add it to your code !

    --

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

  2. Oury Ba-MSFT 19,581 Reputation points Microsoft Employee
    2024-07-30T21:46:36.14+00:00

    @An Phan Son Thank you for reaching out

    Seems like you are referring to the connection string you need to connect to this cluster using your application code. I tried to reproduce from my end, and I am able to see the connection string. You are in the right blade to retrieve that information. You should be able to see the key.

    I have tested that from my end, and I was able to see the connection string, which include the account key.

    User's image If you still can’t find it, please check if you have the necessary permissions to view the keys. Sometimes, access might be restricted based on your role in the Azure portal.

    Please check out this link https://www.youtube.com/watch?v=FimrsNEJ83c

    0 comments No comments

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.