18 Aug 2023
02:10 PM
- last edited on
29 Aug 2023
08:39 AM
by
MaciejNeumann
For more reference in this step you can take a look at this post from @AgataWlodarczyk with a video from @adam_gardner
Open the User menu and select Account settings (in latest Dynatrace, Account Management).
On the top navigation bar, go to Identity & access management > OAuth clients.
Select Create client.
Provide an email of the user who owns the client.
Provide a description for the new client.
Select the required token scopes. These are the scopes that the client will be able to grant. Tokens generated by the client might have different scope sets.
Select Create client.
Copy the generated information to the clipboard. Store it in a password manager for future use.
Environment
Import
Get your Bearer Token
Using Collection
18 Aug 2023 07:16 PM
Thank you for documenting this @DanielS
18 Aug 2023 09:32 PM
Your welcome @ChadTurner. The use of Oauth2 clients to obtain valid Bearer tokens is what is coming to Dynatrace API.
18 Aug 2023 09:34 PM
Thanks @dannemca It took me a while to implement it in Postman, but it will surely be very useful for interacting with the API. I'm thinking improvements for future releases.
23 Aug 2023 02:53 PM
Thanks @Mizső hope it helps.
21 Aug 2023 01:05 PM
GOLDEN!!!
23 Aug 2023 02:54 PM
Thanks @Kenny_Gillette
11 Sep 2023 10:28 AM
As a Partner who often needs to manage several Accounts, this is so very very useful!! Thank you, @DanielS !!
11 Sep 2023 05:02 PM
Glad to help @PedroDeodato
19 Jul 2024 07:20 PM
Great contribution! Thank you so much!
05 Sep 2025 08:28 PM
This is amazing. Thank you very much for putting this together.
I have one question, which I presume is from a slight UI change, but I am not sure. In step 4 "Get Your Bearer Token" I followed everything through step 6 - Click on Use Token, but then I cannot for the life of me figure out how to set the token as a variable. I cannot find the option "Set as Variable" anywhere within my Postman user interface. I see this was originally created a few years ago. By any chance has someone used this recently that can walk me through how to set the new bearer token as a variable, using the most recent version of Postman?
05 Sep 2025 09:06 PM - edited 05 Sep 2025 09:09 PM
Thank you @djmnyc , I appreciate your words and your good observation. The Postman UI has changed, and the process is now slightly different.
For some reason, when you do this, Postman adds a ↩️ CR LF (Carriage Return + Line Feed) character — I believe this is a bug.
4. To work around this, go to Environments.
5. Select your "<ENVIRONMENT NAME>".
6. Go to DT_TOKEN and manually erase the ↩️ CR LF character (you'll usually find it at the end of the value).
7. Then choose your favorite API and press Send — this should work.
05 Sep 2025 09:21 PM
Oh wow. That was quick!
I was actually about to reply to say that I figured it out after poking around since my first post. I was able to get it to work by selecting the entire token, making sure to only select up to the last visible character, right click, and assign to DT_TOKEN. This worked for me! Thanks so much.
Quick follow up question ... and I would imagine this is a common audit request for other DT admins ... but I cannot find an easy solution online. I have been asked to provide a user list, with all permissions for each user. So, I would like to produce a user list with all the groups that each user is a member of. I see the DT Acct Mgmt API has a call to get all users and another API call that will retrieve all groups for a given user. I would imagine someone has solved this before with scripting, where you get the full user list, store in an array/list of some sort, and then iterate through that collection calling the group API for each user. Each iteration would add the group membership list for each user in some sort of map. Finally, the output could then be written as a simple CSV:
user1, group1, group2, group5
user2, group1, group3
user3, group3, group5
etc
I am completely new to Postman and learning python. Is this something that can easily be done with Postman? Have you seen this done before?
05 Sep 2025 09:39 PM
Yes I use a lot Postman Flows, it is a great tool to help you navigate the API's and simplify data extraction.
I work with three main group levels, where each higher-level group inherits the permissions of the previous one and adds some additional capabilities. To simplify, let's call them: User, Power User, and Admin.
Each group is associated with specific IAM policies, and may or may not include permission boundaries, depending on the case.
Since this structure is replicated across each Business Unit in the company, I only maintain and deliver the core set of policies for User, Power User, and Admin.
If someone wants to understand what a given user can do — and considering we have around 17,000 users, each typically assigned to only one group — I suggest they take a random sample from the user base. Once I receive that subset, I can extract and provide the relevant permission details for analysis. Hope it helps