Create an OAuth client for the Dynatrace Monaco CLI

  • Latest Dynatrace
  • How-to guide
  • 3-min read

This guide shows you how to create an OAuth client for use with Dynatrace Configuration as Code via Monaco.

Create an OAuth client

  1. Go to Account Management.

  2. Select Identity & access management > OAuth clients.

  3. Select Create client.

  4. Enter the email address of the user who owns the client.

  5. Enter a description of the new client.

  6. Select the required scopes.

Each available type of Platform configuration requires specific OAuth scopes. For details, see Monaco API support and access permission handling.

Generally, OAuth client credentials for the Dynatrace Monaco CLI should have these scopes:

PurposeScopes
Access Platform metadata like Classic URLs and version informationapp-engine:apps:run
Manage Settings 2.0 objects and its all-users permissionsettings:objects:read, settings:objects:write
View Settings 2.0 schemassettings:schemas:read
Manage automation workflowsautomation:workflows:read, automation:workflows:write, automation:calendars:read, automation:calendars:write, automation:rules:read, automation:rules:write
Access all Automation Workflows1automation:workflows:admin
Manage Grail bucketsstorage:bucket-definitions:read, storage:bucket-definitions:write, storage:bucket-definitions:delete
Manage documentsdocument:documents:read, document:documents:write, document:documents:delete, document:trash.documents:delete
Manage OpenPipelines2openpipeline:configurations:read, openpipeline:configurations:write
Manage segmentsstorage:filter-segments:read, storage:filter-segments:write, storage:filter-segments:delete, storage:filter-segments:admin
Manage Service-Level Objectives (SLOs)slo:slos:read, slo:slos:write
1

To use the automation:workflows:admin scope, you need to create a custom policy granting that scope, bind a group to it, and assign your user to that group in Account Management before creating the OAuth client. For detailed information on managing policies, see Manage IAM policies.

2

To manage OpenPipeline configurations, ensure that the user belongs to a group with the policy Data Processing and Storage assigned to it before creating the OAuth client.

  1. Select Create client.

  2. Copy the generated client ID and secret and store them in a safe place.

    You can only access your client secret once upon creation. You can't reveal it afterward.

Ensure service user permissions

In addition to the scopes available to the OAuth client, permissions can be further limited via policies applied to the user's groups.

For details on how permissions can be controlled, see Working with policies.

To ensure that your OAuth client works as intended, verify that the service user's groups grant the same scopes as the OAuth client you have created for all environments you want to use it with.

Use your OAuth client

  1. Follow the instructions for your operating system or CI/CD tool on how to make the client ID and secret available as environment variables.
  2. Reference the environment variables you have created in the oAuth section of your manifest file.
  3. The Dynatrace Monaco CLI will request OAuth access tokens using your client credentials to make authenticated API calls.
Related tags
Software Delivery