Rotate tenant token

The tenant token is used by OneAgents and ActiveGates to report data to Dynatrace. Dynatrace automatically generates the tenant token and adds it to OneAgent and ActiveGate installers on download.

You can change the tenant token as needed (for example, to adhere to internal security policies or respond to unintended exposure). The procedure for changing the tenant token is called tenant token rotation.

To rotate the token, you need to generate a new token, assign it to all OneAgents and ActiveGates that report data to the environment, and then disable the old token.

To avoid data loss, both old and new tokens are valid during the rotation process.

Start the rotation and generate a new tenant token by executing the POST start rotation request.

The request returns the new token in the active field of the response body.

Add the new token to ActiveGates. For each ActiveGate:

Stop the ActiveGate.
Restart the ActiveGate.

Add the new token to OneAgents. For each OneAgent:

Add the new token to the communication settings of the OneAgent.

Use the --set-tenant-token command of the OneAgent command-line interface.

Restart OneAgents.

You can combine both steps into one command:

oneagentctl --restart-service --set-tenant-token={new token}
Finish the rotation by executing the POST finish rotation request. This finishes the process and renders the old token invalid.