> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Dynatrace with OAuth 2.0 Client Credentials – StackOne Hub

> Link a Dynatrace account in the StackOne Hub using OAuth 2.0 Client Credentials. End-user guide to authorize the integration and start using Dynatrace actions.

> [!WARNING]
>
> The subject of the OAuth client's token must be an active user: either a service user or any user with account-user-management permission.

## Find your Environment ID

Your Environment ID identifies your Dynatrace environment and is the first part of its URL.

**1. Copy the Environment ID**

Sign in to [Dynatrace Account Management](https://myaccount.dynatrace.com), then open **Settings** > **Environments**.

<ul>
  <li>Copy the value in the **Environment** column across to **Environment ID**.</li>
  <li>Format: `https://{Environment ID}.apps.dynatrace.com`</li>
  <li>Example: if your environment URL is `https://abc12345.apps.dynatrace.com`, your **Environment ID** is `abc12345`</li>
</ul>

![The Environments page in Dynatrace Account Management with the environment highlighted in the Environment column.](https://mintcdn.com/stackone-60/mdOJcsWd0VMTPEB8/connectors/dynatrace/images/oauth2_client_credentials-config-environment-id.png?fit=max\&auto=format\&n=mdOJcsWd0VMTPEB8\&q=85\&s=c50ce29d624df262a8f4094e7983ed90)

## Creating an OAuth client

The OAuth client's tokens act with the permissions of its subject user.

**1. Enter the client details**

In Account Management, open **Identity & access management** > **OAuth clients**.

<ul>
  <li>Click **Create client**.</li>
  <li>**Grant type**: **Client credentials**</li>
  <li>**Subject user email**: Email of the user the client acts as</li>
  <li>**Description**: `StackOne Integration`</li>
</ul>

![The Create OAuth client page with Client credentials, Subject user email and Description highlighted.](https://mintcdn.com/stackone-60/mdOJcsWd0VMTPEB8/connectors/dynatrace/images/oauth2_client_credentials-config-client-details.png?fit=max\&auto=format\&n=mdOJcsWd0VMTPEB8\&q=85\&s=4cfdae86c4c02bf6d2db377418d13014)

**2. Select the permissions**

Under **Permissions**, use **Search permissions** to find each of these permissions and select its checkbox:

```
mcp-gateway:servers:invoke
mcp-gateway:servers:read
ai:operator:execute
davis-copilot:conversations:execute
davis-copilot:nl2dql:execute
davis-copilot:document-search:execute
davis-copilot:dql2nl:execute
davis:analyzers:read
davis:analyzers:execute
document:documents:read
storage:bizevents:read
storage:buckets:read
storage:entities:read
storage:events:read
storage:files:read
storage:logs:read
storage:metrics:read
storage:security.events:read
storage:smartscape:read
storage:spans:read
storage:system:read
storage:user.events:read
storage:user.replays:read
storage:user.sessions:read
```

<ul>
  <li>Click **Create client**.</li>
</ul>

![The Permissions section filtered by mcp-gateway, with Invoke MCP servers and List MCP servers selected.](https://mintcdn.com/stackone-60/mdOJcsWd0VMTPEB8/connectors/dynatrace/images/oauth2_client_credentials-config-permissions.png?fit=max\&auto=format\&n=mdOJcsWd0VMTPEB8\&q=85\&s=4e23c6bf1216f39c15c0ff5133c92244)

**3. Copy the credentials**

Dynatrace shows the **Client Secret** only once.

<ul>
  <li>Copy the **Client ID** across.</li>
  <li>Copy the **Client Secret** across.</li>
  <li>Copy the UUID at the end of the **Dynatrace URN** across to **Account UUID**.</li>
  <li>Format: `urn:dtaccount:{Account UUID}`</li>
  <li>Example: if your **Dynatrace URN** is `urn:dtaccount:abcdefab-cdef-abcd-efab-cdefabcdefab`, your **Account UUID** is `abcdefab-cdef-abcd-efab-cdefabcdefab`</li>
  <li>Click **Finish**.</li>
</ul>

![The OAuth client created page with the Client ID and Client Secret copy buttons and the Dynatrace URN field highlighted.](https://mintcdn.com/stackone-60/mdOJcsWd0VMTPEB8/connectors/dynatrace/images/oauth2_client_credentials-config-copy-credentials.png?fit=max\&auto=format\&n=mdOJcsWd0VMTPEB8\&q=85\&s=3b5f17dbcae29dc1e1ed0631cba7a5dd)

## Link the Account

**1. Connect**

<ul>
  <li>Click **Connect**.</li>
  <li>If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider's authorization flow.</li>
  <li>Once authorization is successful, you will see a confirmation popup.</li>
</ul>

**2. Use Actions**

Connect an AI platform to the linked account's actions. See [AI Platforms](https://docs.stackone.com/ai-platforms/overview.md).

Other ways to call actions are listed in [Protocols & SDKs](https://docs.stackone.com/connect/protocols-and-sdks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.