---
schema_version: "1"
id: 9d595ada70d98cce49471f43e5f996af66eddea51e3aa45fbe135a1351b4f1e2
title: Set Up the Environment and Access Permissions
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mq/mq-access-management.md
canonical_url: https://docs.mulesoft.com/mq/mq-access-management
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 433e4d15704a156063b0d423e2571d394ddadc1ca40c82449f3a534bd3dfdca1
description: MuleSoft Documentation Site
latest: true
---
---
product: MQ
---

# Set Up the Environment and Access Permissions

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

Create an environment and manage the roles of users who administer Anypoint MQ features in Anypoint
Platform for your organization by using Access Management.

## Before You Begin

- Create an environment for permissions.

  Follow the steps in
  [To Create a New Environment](https://docs.mulesoft.com/access-management/environments#to-create-a-new-environment).

- Make sure you have the [permissions](#anypoint-mq-permissions) required to use Anypoint MQ.

## Anypoint MQ Permissions

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Required Permissions</th><th>Grants the Ability to</th><th>Notes</th></tr></thead><tbody><tr><td><div><div><p>View clients</p></div></div></td><td><div><div><p>View all client apps, including client app IDs and client secrets for each client app.</p></div></div></td><td><div></div></td></tr><tr><td><div><div><p>View destinations</p></div></div></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><td><div></div></td></tr><tr><td><div><div><p>Clear destinations</p></div></div></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><td><div></div></td></tr><tr><td><div><div><p>Manage clients</p></div></div></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><td><div></div></td></tr><tr><td><div><div><p>Administer destinations</p></div></div></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><td><div></div></td></tr><tr><td><div><div><p>Manage destinations (deprecated)</p></div></div></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><li><p>Create new queues and message exchanges.</p></li><li><p>Edit existing queues and message exchange settings.</p></li><li><p>Access <strong>Message Sender</strong> and <strong>Browser</strong> pages.</p></li><li><p>Delete messages.</p></li><li><p>Purge messages from queues.</p></li></ul></div></div></td><td><div><div><p>This permission is deprecated. Assign these permissions instead:</p></div><div><ul><li><p>Administer destinations</p></li><li><p>Destination subscriber for a given environment</p></li><li><p>Destination publisher for a given environment</p></li></ul></div></div></td></tr><tr><td><div><div><p>Destination subscriber for a given environment</p></div></div></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><td><div></div></td></tr><tr><td><div><div><p>Destination publisher for a given environment</p></div></div></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><td><div></div></td></tr><tr><td><div><div><p>Read MQ stats</p></div></div></td><td><div><div><p>View organization and environment statistics.</p></div></div></td><td><div></div></td></tr></tbody></table>

To assign user permissions, follow the steps in
[Grant Permissions to Users](https://docs.mulesoft.com/access-management/users#grant-user-permissions).

To use teams to assign permissions, follow the steps in
[Using Teams to Manage User Permissions](https://docs.mulesoft.com/access-management/teams).

Anypoint MQ access is controlled at the environment and business group levels, not per individual
queue or message exchange.

Permissions such as **Destination Publisher** and **Destination Subscriber** are granted at the
environment level and apply to all destinations in that environment.

There is no native mechanism to restrict access to a single queue or message exchange.

## Switch Environments

To switch environments:

1.  In Anypoint Platform, go to **MQ**.

2.  Click the environment button.

    ![Environment button with Production environment selected](/mulesoft/current/en-us/mq/_images/mq-switch-env.png)

    - To switch to a different environment, click the name of that environment (for example,
      **Sandbox**, if you previously created a sandbox environment) and then click **Switch**.

    - To change your default environment, click **Open your profile to change the default
      environment** and choose a different environment from the **Default** environment list.

## See Also

- [Permissions by Product in Anypoint Platform](https://docs.mulesoft.com/access-management/permissions-by-product)
