Automations
All questions related to Workflow Automation, AutomationEngine, and EdgeConnect, as well as integrations with various tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow to export user list

Vasan
Visitor

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.

2 REPLIES 2

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.

🔧Required configuration in the JavaScript step

You will need to update the following part of the code:

await usersAndGroupsClient.getActiveUsersForOrganizationalLevel({
  levelType: "account",
  levelId: "ACCOUNTID",
  partialString: "@DOMAIN",
});

📌Replace these values:

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"

  • ".eu"
  • ".com"

Vasan
Visitor

Thanks, Dylan - will give it a whirl.

Featured Posts