20 May 2026
11:32 AM
- last edited on
21 May 2026
07:44 AM
by
MaciejNeumann
Can anyone share a workflow that extracts user list from Dynatrace? Ideally, we need the roles for each of the users as well in an excel spreadsheet that is emailed out.
26 May 2026 11:22 AM - edited 26 May 2026 11:24 AM
Hey Vasan,
Emailing an Excel spreadsheet is not possible using the default Mailing action, as it only supports a title + description in plain string (text) format and does not allow attachments.
What we can do instead is generate a CSV-formatted string. You can then simply copy-paste this into Excel.
I already have a base implementation for this that fetches all users and formats them into CSV.
You will need to update the following part of the code:
await usersAndGroupsClient.getActiveUsersForOrganizationalLevel({
levelType: "account",
levelId: "ACCOUNTID",
partialString: "@DOMAIN",
});1. ACCOUNTID
You can retrieve this from:
https://myaccount.dynatrace.com/accounts
Open your account
The ACCOUNT UUID is visible in the URL
Copy the UUID and replace ACCOUNTID in the code
Example:
https://myaccount.dynatrace.com/account/home?account-uuid=xxxxx-xxxx-xxxx-xxxx-xxxx
→ Use the xxxxx-xxxx-xxxx-xxxx-xxxx part as ACCOUNTID
2. partialString: "@DOMAIN"
This is a required filter and must be at least 3 characters long.
You can use part of the email domain to filter results, for example:
"@domain"
27 May 2026 09:57 AM
Thanks, Dylan - will give it a whirl.
Featured Posts