Creating a user export with the roles included


A customer of ours wants to receive an export of all the users, including the roles of the users.

The Bulk export users job does not includes the roles for what I see. Is there a way to achieve this?

Fetching all the users and all the roles and combining this is not possible in this case, because there are more than 1000 users active and the GET users endpoint only returns 1000 users max.

Hi @brecht.laitem , welcome to the community!

Unfortunately there is no way to do this with a single API call currently, and will take some effort to pull together.

It would require using either the Get a role’s users endpoint for each role to find that role’s users, or for each user fetch their roles with the Get a user’s roles endpoint.

You would then need to take these results and combine it with the results from your user export or user search to give to your customer.

1 Like

Hi @sgo ,

I got it working by using the bulk users export and fetching the users from each role and combining that data into a working Excel sheet.

But this use case is so trivial it should be possible to get that data with a single endpoint. I’m now using this for an Excel sheet and that works fine. But if the customers wants to see the roles of each user on our user administration overview page, I can’t do that the same way.

So an option to include the roles on the List Users endpoint would be top notch :slight_smile:

Kind regards

1 Like

Hey there @brecht.laitem !

Glad it’s working for you now! Can you share that feedback by opening a topic in our feedback category here?

Thank you!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.