You can connect third-party integrations to your Cloud Automation instance. To authenticate the integration, the OAuth 2.0 client credentials flow is used.
Make sure that you trust the integration, verify its developers, and check what kind of information the integration is going to access.
Generate an OAuth 2.0 client
To generate an OAuth 2.0 client
Go to Account Management. If you have more than one account, select the account you want to manage.
Copy your client ID, client secret, and Dynatrace account URN. These settings are required for the Client credentials flow.
The OAuth 2.0 client cannot have wider permissions than the user who requested the client.
Test the OAuth 2.0 client for retrieving an access token
Authenticate with your client ID and client secret obtained above to retrieve the access token.
curl --location --request POST 'https://sso.dynatrace.com/sso/oauth2/token?grant_type=client_credentials&client_id=<YOUR-CLIENT-ID>&client_secret=<YOUR-CLIENT-SECRET>&resource=<YOUR-DYNATRACE-ACCOUNT-URN>&scope=cloudautomation:events:read'\
In the Cloud Automation UI (bridge), go to your user menu in the upper-right corner and copy the API token, which is used for authenticating API calls.
To access the token, the user needs to be assigned the cloudautomation:metadata:read policy statement. For details about the API, see API.
Migrate to OAuth 2.0-based authentication
Token-based authentication is deprecated. Adapt your integrations to use OAuth 2.0-based authentication instead.
API interaction in automation code
If you are sending HTTP requests to communicate with the API, you potentially add the x-token header to authenticate the request with the provided token. Please adapt your HTTP requests to leverage OAuth 2.0-based authentication.
These instructions make use of jq, which is a tool to parse a JSON object for deriving the access token. You can use your preferred JSON parser instead.