I am trying to migrate mongodb data to Cosmos db. The migration tool I am using, is asking for "AccountKey" required to connect the Cosmosdb.
I am not able to get the account key in azure portal.
https://portal.azure.com
Navigate to your Azure Cosmos DB account on the Azure portal. Select Keys from the left menu, then select Regenerate Primary Key from the ellipsis on the right of your primary key.
Access Azure Cosmos DB ExplorerSign in to Azure portal. From All resources, find and navigate to your Azure Cosmos DB account, select Keys, and copy the Primary Connection String. Go to https://cosmos.azure.com/, paste the connection string and select Connect.
Like every Azure resource, Azure Cosmos DB has two master keys, primary key and secondary key. Any one of these two keys can be used to access the Cosmos DB. If you navigate to Cosmos DB resource in Azure Portal, you can find the master keys under “Keys” section, as shown in below snapshot.
The master key token is the all access key token that allows users to have full control of Cosmos DB resources in a particular account. The master key is created during the creation of an account.
You can find the AccountKey from Settings -> ConnectionString -> Primary Password
when you click on your cosmosDB resource
Navigate to Settings -> Keys
to view Primary Key as well as Connection String for CosmosDB in Azure Portal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With