# PRO TIP - Dynatrace Account Management API Postman Collection

**URL:** <https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266>\
**Category:** Dynatrace Tips\
**Tags:** usability, integrations, tips-and-tricks, dynatrace-api\
**Created:** [August 18, 2023, 1:10pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266 "2023-08-18T13:10:26Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [August 18, 2023, 1:10pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/1 "2023-08-18T13:10:26Z")

</div>

My fellow DynaMight&nbsp;:dynamight: Patrick Hofmann [pahofmann](https://community.dynatrace.com/user/22796) has shared several [Postman collections](https://community.dynatrace.com/post/116410) for the different [Dynatrace API’s](https://www.dynatrace.com/support/help/shortlink/section-api) with the community.Encouraged by this because I use them daily, I created a [Postman Collection](https://github.com/dstanizzo/Dynatrace-API-Account.Management-Postman-Collection) for the new [Account management API](https://www.dynatrace.com/support/help/shortlink/account-api) following the guidelines used in the ones created by Patrick.I share the steps to get this working in your Postman client.

## 1. Create an Oauth2 Client in Dynatrace

For more reference in this step you can take a look at [this](https://community.dynatrace.com/post/217350) post from [@AgataWlodarczyk](https://community.dynatrace.com/user/45226) with a video from [@adam\_gardner](https://community.dynatrace.com/user/167)

1. Open the User menu and select Account settings (in latest Dynatrace, Account Management).
2. On the top navigation bar, go to Identity & access management \> OAuth clients.
3. Select Create client.
4. Provide an email of the user who owns the client.
5. Provide a description for the new client.
6. 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.
  - Allow read access for identity resources (users and groups) **account-idm-read**
  - Allow write access for identity resources (users and groups) **account-idm-write**
  - Allow read access for environment resources **account-env-read**
  - Allow write access for environment resources **account-env-write**
  - Allow read access for usage and consumption resources **account-uac-read**
  - Allow write access for usage and consumption resources **account-uac-write**
  - Allow IAM policy configuration for environments. **iam-policies-management** ; **iam:policies:read** ; **iam:policies:write** ; **iam:bindings:read** ; **iam:bindings:write** ; **iam:effective-permissions:read**.

7. Select Create client.
8. Copy the generated information to the clipboard. Store it in a password manager for future use.

## 2. Create an Environment for your Collection in Postman

 ![Environment](https://global.discourse-cdn.com/dynatrace/original/3X/5/4/54d6d110028224846651bc0fe61fadb8f6573f84.png)

1. Select Environments.
2. Click the + sign.
3. Name your Environment.
4. The environment needs that you define these variables:
  - **DT\_CLIENT\_ID** Provided when you create the Oauth2 client in step 1.
  - **DT\_CLIENT\_SECRET** Provided when you create the Oauth2 client in step 1.
  - **DT\_ACCOUNT\_URN** Provided when you create the Oauth2 client in step 1.
  - **DT\_UUID** Same value of DT\_ACCOUNT\_URN but stripping the urn:account:
  - **DT\_SCOPE** A list of required scopes separated by a whitespace.
  - **DT\_TOKEN\_URL** ⚠ **PLEASE DON’T CHANGE THIS VALUE** ⚠ The URL _[https://sso.dynatrace.com/sso/oauth2/token](https://sso.dynatrace.com/sso/oauth2/token)_ where you need to obtain your Bearer token after create the Oauth2 client.
  - **DT\_TOKEN\_NAME** The name for your token.
  - **DT\_TOKEN** In this variable you will store your assigned dynamic token.
  - **DT\_HOST** ⚠ **PLEASE DON’T CHANGE THIS VALUE** ⚠ The URL _[api.dynatrace.com](http://api.dynatrace.com)_ of the Dynatrace API for Account Management.

5. Leave this Environment Selected.

## 3. Import Dynatrace Account Management API Collection

 ![Import](https://global.discourse-cdn.com/dynatrace/original/3X/9/a/9a73d1b95f6f5b1b8492990c55318a8d0ce82e85.png)

1. Download the [Dynatrace Account Management](https://github.com/dstanizzo/Dynatrace-API-Account.Management-Postman-Collection/blob/main/Dynatrace%20Account%20Management%20API%20v1%20Collection/Dynatrace%20Account%20Management%20API%20v1.json) JSON from the repository.
2. Select Collections.
3. Click on Import and choose the previously downloaded JSON.
4. Your Dynatrace Account Management API v1 Collection has been added to your collection.

## 4. Get your Bearer Token

 ![Get your Bearer Token](https://global.discourse-cdn.com/dynatrace/original/2X/3/31cc068088538b02abb8034cc83ba56847bfe6b2.png)

1. ⚠ **DON’T FORGET TO HAVE SELECTED THE ENVIRONMENT CREATED IN STEP 2** ⚠
2. Select your recently imported Dynatrace Account Management API v1 Collection.
3. Click on the Authorization tab.
4. Click on Get New Access Token.
5. Wait until the token has been collected.
6. Click on Use Token.
7. ⚠ **BE SURE TO SELECT ALL YOUR TOKEN** ⚠ And then select Set as variable.
8. Choose the **DT\_TOKEN** variable to store your new Bearer Token.

## 5. Ready, Set, Go 🚦

 ![Using Collection](https://global.discourse-cdn.com/dynatrace/original/3X/2/c/2c91cfa316e44a4a395e6fd8b61d2eb3936cf2f7.png)

1. ⚠ **DON’T FORGET TO HAVE SELECTED THE ENVIRONMENT CREATED IN STEP 2** ⚠
2. Select Collections.
3. Then Select the Request you want to use and check the parameters.
4. Click on Send.
5. And if everything goes well you get your Response.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [August 18, 2023, 6:16pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/2 "2023-08-18T18:16:59Z")

</div>

Thank you for documenting this&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [August 18, 2023, 8:15pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/3 "2023-08-18T20:15:05Z")

</div>

This is gold!

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [August 18, 2023, 8:32pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/4 "2023-08-18T20:32:24Z")

</div>

Your welcome [@ChadTurner](https://community.dynatrace.com/user/14877). The use of Oauth2 clients to obtain valid Bearer tokens is what is coming to Dynatrace API.

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [August 18, 2023, 8:34pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/5 "2023-08-18T20:34:27Z")

</div>

Thanks [@dannemca](https://community.dynatrace.com/user/18264) 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.

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [August 19, 2023, 8:21am UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/6 "2023-08-19T08:21:44Z")

</div>

WOW!

This is a very good and detailed guide! Thanks for sharing it&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)&nbsp;!

---

<div class="post-metadata">

**Author:** ![Kenny\_Gillette](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kenny_gillette/32/20170_2.png) [@Kenny\_Gillette](https://community.dynatrace.com/u/Kenny_Gillette)\
**Post date:** [August 21, 2023, 12:05pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/7 "2023-08-21T12:05:42Z")

</div>

GOLDEN!!!

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [August 23, 2023, 1:53pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/8 "2023-08-23T13:53:45Z")

</div>

Thanks [@Mizső](https://community.dynatrace.com/user/47783) hope it helps.

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [August 23, 2023, 1:54pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/9 "2023-08-23T13:54:01Z")

</div>

Thanks [@Kenny\_Gillette](https://community.dynatrace.com/user/36140)

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [September 10, 2023, 11:46am UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/10 "2023-09-10T11:46:11Z")

</div>

Awesome, Thanks to share.

---

<div class="post-metadata">

**Author:** ![PedroDeodato](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pedrodeodato/32/32284_2.png) [@PedroDeodato](https://community.dynatrace.com/u/PedroDeodato)\
**Post date:** [September 11, 2023, 9:28am UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/11 "2023-09-11T09:28:32Z")

</div>

As a Partner who often needs to manage several Accounts, this is so very very useful!! Thank you,&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)&nbsp;!!

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [September 11, 2023, 4:02pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/12 "2023-09-11T16:02:45Z")

</div>

Glad to help [@PedroDeodato](https://community.dynatrace.com/user/40725)

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [November 17, 2023, 11:27pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/13 "2023-11-17T23:27:39Z")

</div>

Thanks&nbsp;[@DanielS](https://community.dynatrace.com/user/35788)&nbsp;for providing this valuable information. It helps me a lot while handling multiple environments.

Tijust

---

<div class="post-metadata">

**Author:** ![Leonardo\_Val](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@Leonardo\_Val](https://community.dynatrace.com/u/Leonardo_Val)\
**Post date:** [July 19, 2024, 6:20pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/14 "2024-07-19T18:20:42Z")

</div>

Great contribution! Thank you so much!

---

<div class="post-metadata">

**Author:** ![djmnyc](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@djmnyc](https://community.dynatrace.com/u/djmnyc)\
**Post date:** [September 5, 2025, 7:28pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/15 "2025-09-05T19:28:36Z")

</div>

This is amazing.&nbsp; 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.&nbsp; 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.&nbsp; I cannot find the option “Set as Variable” anywhere within my Postman user interface.&nbsp; I see this was originally created a few years ago.&nbsp; 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?

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [September 5, 2025, 8:06pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/16 "2025-09-05T20:06:34Z")

</div>

![DanielS_1-1757102143869.png](https://global.discourse-cdn.com/dynatrace/original/2X/e/e0978b4ac401776adbf6d5cf394124fd4901ef3b.png)

Thank you&nbsp;[@djmnyc](https://community.dynatrace.com/user/84138)&nbsp;,&nbsp;I appreciate your words and your good observation. The Postman UI has changed, and the process is now slightly different.

1. Select all the token, then right-click.
2. Go to Set and choose your “\<ENVIRONMENT NAME\>”.
3. Then select DT\_TOKEN.

For some reason, when you do this, Postman adds a&nbsp;↩️ 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&nbsp;↩️ 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.

---

<div class="post-metadata">

**Author:** ![djmnyc](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@djmnyc](https://community.dynatrace.com/u/djmnyc)\
**Post date:** [September 5, 2025, 8:21pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/17 "2025-09-05T20:21:07Z")

</div>

Oh wow.&nbsp; That was quick!

I was actually about to reply to say that I figured it out after poking around since my first post.&nbsp; 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.&nbsp; This worked for me!&nbsp; Thanks so much.

Quick follow up question … and I would imagine this is a common audit request for other DT admins …&nbsp; but I cannot find an easy solution online.&nbsp; I have been asked to provide a user list, with all permissions for each user.&nbsp; So, I would like to produce a user list with all the groups that each user is a member of.&nbsp; 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.&nbsp; 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.&nbsp; Each iteration would add the group membership list for each user in some sort of map.&nbsp; &nbsp;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.&nbsp; Is this something that can easily be done with Postman?&nbsp; Have you seen this done before?

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [September 5, 2025, 8:39pm UTC](https://community.dynatrace.com/t/pro-tip-dynatrace-account-management-api-postman-collection/41266/18 "2025-09-05T20:39:29Z")

</div>

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
