Export List of Users assigned to each Group


#1

Hello Celonites - Does anyone know of a way to export a list of users assigned to each group? We can get our total list of users, but we also want to be able to export which groups and subsequently which folders and analyses they have access to. We’re currently running Celonis 4.3.

Thanks!
Tyler


#5

Hi Tyler,

have you tested the Celonis Python Tools yet? You can solve many problems like that using the python API.
The Celonis Python Tools can be downloaded on my.celonis.de.
There are two packages available in the downloadable folder. You only need to install python_api.

To give you an example, how you could export all users with their permission groups, have a look at this code snippet:

import celonis_tools
from celonis_tools.api import CelonisSession
from celonis_tools.model import User, Group

with CelonisSession("http://localhost:9000/",<your username>, api_token=<your api token>, api_secret=<your api secret>) as session:
	groups = Group.load_all().all()
	for group in groups:
		users = group.users
		print("Users of group {}: {}".format(group.name, ", ".join([user.username for user in users])))

For further help you can also have a look at our documentation which is included in the download package on my.celonis.de.

Best regards,
Kerstin