0 / 0
Microsoft Azure Cosmos DB connection
Last updated: Dec 09, 2024
Microsoft Azure Cosmos DB connection

To access your data in Microsoft Azure Cosmos DB, create a connection asset for it.

Azure Cosmos DB is a fully managed NoSQL database service.

Create a connection to Microsoft Azure Cosmos DB

To create the connection asset, you need these connection details:

  • Hostname
  • Port number
  • Master key: The Azure Cosmos Database primary read-write key
Note: Prerequisite for Entra ID authentication:

Microsoft Entra ID is a cloud-based identity and access management service. To obtain connection values for the Entra ID authentication method, sign in to the Microsoft Azure portal and go to your storage account. For information about Microsoft Entra ID, see What is Microsoft Entra ID?.

Entra ID client secret credential

  • Tenant ID: The Microsoft Entra tenant ID. To find the Tenant ID, go to Microsoft Entra ID> Properties. Scroll down to the Tenant ID field. For more information, see How to find your Microsoft Entra tenant ID.
  • Client ID: The client ID for authorizing access to Microsoft Azure Cosmos DB. To find the Client ID for your application, select Microsoft Entra ID. From App registrations, select your application. Click Copy to copy the Client ID of your application. For more information, see Register a Microsoft Entra app and create a service principal.
  • Client secret: The authentication key that is associated with the client ID for authorizing access to Microsoft Azure Cosmos DB. To find the Client secret for your application, select Microsoft Entra ID. From App registrations, select your application. Go to Certificates & secrets > Client secrets. Click Copy to copy the existing Client secret or click New client secret to create a new Client secret and copy it. For more information, see Register a Microsoft Entra app and create a service principal.
  • Storage account URL: Storage account URL.

Entra ID username password credential

  • Client ID: The client ID for authorizing access to Microsoft Azure Cosmos DB. To find the Client ID for your application, select Microsoft Entra ID. From App registrations, select your application. Click Copy to copy the Client ID of your application. For more information, see Register a Microsoft Entra app and create a service principal.
  • Username and Password: Username and password for the Microsoft Azure Cosmos DB account. You need permission to access without multi-factor authentication.
  • Storage account URL: Storage account URL.

Azure Cosmos DB setup

Restrictions

  • Only the Core (SQL) API is supported.
  • When using Entra ID credentials for authentication with Azure Cosmos DB connection, creating or deleting a collection/container is not supported. Only listing existing collections and making changes to them is supported. For more information, refer to Azure Cosmos DB documentation.

Running SQL statements

To ensure that your SQL statements run correctly, refer to the Azure Cosmos DB documentation for the correct syntax.

Learn more

Azure Cosmos DB

Parent topic: Supported connections

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more