Skip to main content

Add the Azure Cosmos DB Connector

Verify the Role Assignment for Your Azure Identity

Before you connect to Azure Cosmos DB, you need to ensure that your Azure identity is assigned the correct role. The identity is the account that you use to log in to the browser (during Azure Active Directory authentication) or into the application (for Azure Service Principal authentication). You can create custom role definitions:
  • CosmosDB Built-in Data Reader
  • CosmosDB Built-in Data Contributor
In addition, you can create custom role definintions. You must also set the scope of the role assignment, where ”/” specifies that the identity can access all the databases. For more details about assigning roles, see Configure role-based access control with Microsoft Entra ID for your Cosmos DB account.

Authenticate to Azure Cosmos DB

After you add the connector, you need to set the required properties. Account Endpoint: Enter the Cosmos DB account URL. This URL is available the Keys blade (Settings > Keys) of your Cosmos DB account. supports authenticating to in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

Account Key

To connect with account-key credentials, specify the following properties:
  • Auth Scheme: Select AccountKey.
  • (Default) Account Key: Enter the master key token or resource token that is required to connect to the Azure Cosmos DB REST API.
  • Token Type: Select the type of token (master or resource) that you are using in the Account Key field. The default token type is master.

Azure Active Directory

Azure Service Principal

Azure Service Principal Certificate

Complete Your Connection

To complete your connection:
  1. For the Schema property (optional), enter the schema (the Azure Cosmos DB database) with which you want to work.
  2. Define advanced connection settings on the Advanced tab. (In most cases, though, you should not need these settings.)
  3. Connect to to connect to your account.
  4. Click Create & Test to create your connection.

More Information