---
schema_version: "1"
id: 74123b1470ceb739aae7f15a3d8005bd76f3bc23ead7f353e57427afb7b88f01
title: Configuring Connected Apps
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mq/mq-connected-apps.md
canonical_url: https://docs.mulesoft.com/mq/mq-connected-apps
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 387f892e789f93e122db7ed4ae51c69545baf1abec58436325cf73bac370861b
description: MuleSoft Documentation Site
latest: true
---
---
product: MQ
---

# Configuring Connected Apps

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The Connected Apps feature enables you to integrate external applications with Anypoint Platform by
providing access to those applications without sharing your user credentials.

When you create a connected app, Access Management lists the client ID and client secret for the
app. You use the client ID and client secret values when configuring Anypoint Connector for MQ
(Anypoint MQ Connector) in a Mule app in Anypoint Studio.

To use connected apps with Anypoint MQ, you must use Anypoint MQ Connector 4.x for Mule 4. For
information about upgrading, see
[Upgrading and Migrating Anypoint MQ Connector](https://docs.mulesoft.com/anypoint-mq-connector/latest/anypoint-mq-connector-upgrade-migrate).
If you are using Anypoint MQ Connector version 3.x or earlier, configure a client app instead. For
information, see [Configuring Client Apps](https://docs.mulesoft.com/mq/mq-client-apps).

For more information about connected apps, see
[Connected Apps in Anypoint Platform](https://docs.mulesoft.com/access-management/connected-apps-overview) and
[Anypoint Platform Connected Apps for Developers](https://docs.mulesoft.com/access-management/connected-apps-developers).

## Configure a Connected App in Access Management

To create a connected app with Anypoint MQ scopes:

1.  In Anypoint Platform, go to **Access Management**.

2.  Click **Connected Apps** in the navigation pane.

3.  Click **Create app**.

    ![Connected Apps navigation option and Create app button in Access Management](/mulesoft/current/en-us/mq/_images/mq-tutorial-create-connected-apps.png)

    <table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td><strong>Connected Apps</strong> menu option displays and creates connected apps.</td></tr><tr><td><i data-value="2"></i><b>2</b></td><td><strong>Create app</strong> button creates a connected app.</td></tr></tbody></table>

4.  Specify a name, such as `DemoApp1` for the app.

5.  Select **App acts on its own behalf (client credentials)**.

6.  Click **Add Scopes**.

    Scopes are roles with associated permissions, which determine which actions the app can perform
    within an organization and environment. See [Anypoint MQ Scopes](#mq-scopes).

    ![Add Scopes window showing the scopes to add to Anypoint MQ connected apps](/mulesoft/current/en-us/mq/_images/mq-conn-apps-scopes.png)

7.  In **Add Scopes** window:

    1.  Enter "MQ" in the **Filter scopes** field.

    2.  Select the Anypoint MQ scopes to apply and click **Next**.

    3.  Select business groups to apply the scopes to and click **Next**.

    4.  Select the environments to apply the scopes to and click **Next**.

    5.  Click **Add Scopes** or **Cancel** to cancel your changes.

8.  Click **Save** or **Cancel** to cancel your changes.

9.  When you configure the connector, click **Copy Id** and **Copy Secret** to copy the ID and
    secret for the app you just created:

    ![Connected Apps window](/mulesoft/current/en-us/mq/_images/mq-conn-apps-window.png)

    Use the client ID and client secret to get the access token required to authenticate with the
    Anypoint MQ API.

10. When you configure Anypoint MQ Connector in your Mule app, paste the client ID and client secret
    values in the **Anypoint MQ Config** window in Studio:

    ![Anypoint MQ Config window showing the URL, Client App ID, and Client Secret fields](/mulesoft/current/en-us/mq/_images/mq-tutorial-studio7-mq-config.png)

    Don’t share the ID and secret pair with multiple apps.

    For more information, see
    [Create and Connect a Mule 4 App to Anypoint MQ in Anypoint Studio 7](https://docs.mulesoft.com/mq/mq-tutorial#configure-mule-4-studio)
    in the Anypoint MQ tutorial.

For information about getting the access token for connected apps, see the
[Access Management API](https://dev-portal.mulesoft.com/apis/access-management.html).

The `/authorize` endpoints in the Anypoint MQ Admin API and Anypoint MQ Broker API do not support
connected apps. You can’t use tokens obtained from those endpoints to access a connected app.

## Configure a Connected App Using the API

For information about configuring a connected app with the API, see
[How to create connected apps using the API](https://help.salesforce.com/s/articleView?id=001115949&type=1).

## Anypoint MQ Scopes

Anypoint MQ scopes apply to all destinations in the given organization and environment.

The Anypoint MQ scopes are:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Scope in UI</th><th>Scope in API</th><th>Description</th></tr></thead><tbody><tr><td><p>Administer destinations</p></td><td><p><code>administer:destinations</code></p></td><td><div><div><ul><li><p>View all destinations and each destination’s settings (<strong>ID</strong>, <strong>Type</strong>, <strong>Message TTL</strong>, and <strong>Message Lock Default TTL</strong>).</p></li><li><p>View <strong>In Queue</strong> message stats.</p></li><li><p>View <strong>In Flight</strong> message stats.</p><div><ul><li><p>Create new queues, message exchanges, and bindings.</p></li><li><p>Edit existing queues, message exchanges, and bindings.</p></li><li><p>Purge messages from queues.</p></li></ul></div></li></ul></div></div></td></tr><tr><td><p>Clear destinations</p></td><td><p><code>clear:destinations</code></p></td><td><div><div><ul><li><p>View all destinations and each destination’s settings (<strong>ID</strong>, <strong>Type</strong>, <strong>Message TTL</strong>, and <strong>Message Lock Default TTL</strong>).</p></li><li><p>View <strong>In Queue</strong> message stats.</p></li><li><p>View <strong>In Flight</strong> message stats.</p></li></ul></div></div></td></tr><tr><td><p>Destination subscriber for given environment</p></td><td><p><code>subscribe:destinations</code></p></td><td><div><div><ul><li><p>Consume messages from a destination.</p></li><li><p>Delete messages from a destination.</p></li></ul></div></div></td></tr><tr><td><p>Destination publisher for given environment</p></td><td><p><code>publish:destinations</code></p></td><td><div><div><ul><li><p>Send messages to a destination.</p></li><li><p>Update message TTL on a destination.</p></li></ul></div></div></td></tr><tr><td><p>Manage clients</p></td><td><p><code>manage:clients</code></p></td><td><div><div><ul><li><p>View all client apps, including client app IDs and client secrets for each client app.</p></li><li><p>Create client apps.</p></li></ul></div></div></td></tr><tr><td><p>Read MQ stats</p></td><td><p><code>read:stats</code></p></td><td><div><div><p>View organization and environment statistics.</p></div></div></td></tr><tr><td><p>View clients</p></td><td><p><code>view:clients</code></p></td><td><div><div><p>View all client apps, including client app IDs and client secrets for each client app.</p></div></div></td></tr><tr><td><p>View destinations</p></td><td><p><code>view:destinations</code></p></td><td><div><div><ul><li><p>View all destinations and each destination’s settings (<strong>ID</strong>, <strong>Type</strong>, <strong>Message TTL</strong>, and <strong>Message Lock Default TTL</strong>).</p></li><li><p>View <strong>In Queue</strong> message stats.</p></li><li><p>View <strong>In Flight</strong> message stats.</p></li></ul></div></div></td></tr></tbody></table>
