
## Crawl Microsoft Azure Cosmos DB

URL: https://docs.atlan.com/apps/connectors/database/microsoft-azure-cosmos-db/how-tos/crawl-microsoft-azure-cosmos-db

> Extract metadata from Microsoft Azure Cosmos DB to catalog databases, containers, and documents. Discover and govern your NoSQL data assets after configuring permissions.

Extract metadata from your [Microsoft Azure Cosmos DB](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) database into Atlan to catalog databases, containers, and documents. After configuring the necessary permissions, you can establish a connection and crawl your NoSQL environment to extract asset-level details.

To crawl metadata from Microsoft Azure Cosmos DB, 

review the [order of operations](https://docs.atlan.com/llms/catalog/connector-capabilities/order-workflows/llms.txt) and then complete the following steps.

## Select the source

To select Microsoft Azure Cosmos DB as your source:

1. In your Atlan workspace, click **Connectors** in the left sidebar.
 * If you are using the **Old UI (Classic)**, click **New Workflow** in the top navigation.

2. Click **Marketplace**.

3. Search for **Cosmos DB Assets** and select it.

4. Click **Install**.

5. Once installation completes, click **Setup Workflow** on the same tile.

## Provide your credentials

Choose your deployment method:

- In **vCore** deployment, you will need the [primary connection string(s)](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of your vCore-based Microsoft Azure Cosmos DB account(s).
- In **RU** deployment, you will need the [client ID, client secret, and tenant ID](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of the service principal you created for your RU-based Microsoft Azure Cosmos DB account.
- In **vCore and RU** deployment, you will need the [primary connection string(s)](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of your vCore-based account(s) and [client ID, client secret, and tenant ID](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of the service principal you created for your RU-based account.

### vCore deployment

To enter your Microsoft Azure Cosmos DB credentials:

1. For _Database API_, _MongoDB_ is the default selection.

2. For _Extraction method_, _Direct_ is the default selection.

3. For _Select the deployment types to crawl_, click **vCore**.

4. For _Connection Strings_, enter the [primary connection string(s) you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) from your Microsoft Azure Cosmos DB account(s).

5. Click the **Test Authentication** button to confirm connectivity to Microsoft Azure Cosmos DB.

6. Once authentication is successful, navigate to the bottom of the screen and click **Next**.

### RU deployment

To enter your Microsoft Azure Cosmos DB credentials:

1. For _Database API_, _MongoDB_ is the default selection.

2. For _Extraction method_, _Direct_ is the default selection.

3. For _Select the deployment types to crawl_, click **RU**.

4. For _Client ID_, enter the [application (client) ID you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) for your service principal.

5. For _Client Secret_, enter the [client secret you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) for your service principal.

6. For _Tenant ID_, enter the [directory (tenant) ID you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) for your service principal.

7. Click the **Test Authentication** button to confirm connectivity to Microsoft Azure Cosmos DB.

8. Once authentication is successful, navigate to the bottom of the screen and click **Next**.

### vCore and RU deployment

To enter your Microsoft Azure Cosmos DB credentials:

1. For _Database API_, _MongoDB_ is the default selection.

2. For _Extraction method_, _Direct_ is the default selection.

3. For _Select the deployment types to crawl_, click **vCore and RU**.

4. For _Client ID_, enter the [application (client) ID you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of the service principal for your RU-based account.

5. For _Client Secret_, enter the [client secret you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of the service principal for your RU-based account.

6. For _Tenant ID_, enter the [directory (tenant) ID you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) of the service principal for your RU-based account.

7. For _Connection Strings_, enter the [primary connection string(s) you copied](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/set-up-microsoft-azure-cosmos-db/llms.txt) from your vCore-based account(s).

8. Click the **Test Authentication** button to confirm connectivity to Microsoft Azure Cosmos DB.

9. Once authentication is successful, navigate to the bottom of the screen and click **Next**.

## Configure the connection

To complete the Microsoft Azure Cosmos DB connection configuration:

1. Provide a _Connection Name_ that represents your source environment. For example, you might use values like `production`,`development`,`gold`, or `analytics`.

2. (Optional) To change the users who are able to manage this connection, change the users or groups listed under _Connection Admins_.

 :::warning

 If you do not specify any user or group, no one will be able to manage the connection - not even admins.

 :::

3. Navigate to the bottom of the screen and click **Next** to proceed.

## Configure the crawler

Before running the Microsoft Azure Cosmos DB crawler, you can further configure it.

On the _Metadata_ page, you can override the defaults for the following:

- For _Extract Collection Schemas_, change to **Yes** to enable Atlan to extract collection schemas by reading a subset of the documents in the collection and [map them to column assets](https://docs.atlan.com/llms/connectors/microsoft-azure-cosmos-db/what-does-atlan-crawl-from-microsoft-azure-cosmos-db/llms.txt). For _Schema extraction sample size_, you can set a custom value of up to 1,000 for documents to be read for schema analysis.

## Run the crawler

To run the Microsoft Azure Cosmos DB crawler, after completing the steps above:

- To run the crawler once immediately, at the bottom of the screen, click the **Run** button.
- To schedule the crawler to run hourly, daily, weekly, or monthly, at the bottom of the screen, click the **Schedule & Run** button.

Once the crawler has completed running, you will see the assets on Atlan's asset page! 🎉

---
