---
title: "Query the application context"
slug: "query-the-application-context"
abstract: "How to retrieve details about the current Marketplace app, such as its name, status, and deployment URL, and about the Sitecore app, such as Context IDs."
---
# Query the application context

*Required extension points: any*

*Required SDK packages: client*

*Required API access: none*

> [!note]
> If you completed the [quick start](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/quick-start--manual-.html "Quick start (manual)"), you've already made this query.

Query the application context to retrieve details about the current Marketplace app, such as its name, status, and deployment URL, and about the Sitecore app, such as environment information and Context IDs.

To query the application context:

1. In the SDK initialization code where you run the `useMarketplaceClient` hook, in the Effect Hook, create a new query, then save your changes:

    ```typescript
    // Make a query to retrieve the application context
    client.query("application.context")
      .then((res) => {
        console.log("Success retrieving application.context:", res.data);
      })
      .catch((error) => {
        console.error("Error retrieving application.context:", error);
      });
    ```

2. In your web browser, in the [Cloud Portal](https://portal.sitecorecloud.io/), find and open your Marketplace app in one of its extension points.
3. Open your web browser's console, then refresh the page.
4. In the console, find the log for `Success retrieving application.context` and inspect the object. The object contains all the details about the current Marketplace app.