Is it possible to see the list of member of a group in the UI?

Options
ecerulm
ecerulm Registered Posts: 45 ✭✭


I want to find out who are the members of a given group , how do I do that?

In the DSS > Administration > Security > Users, I can see each user and the groups they belong to, but that will require me to go user by user , looking if they are in a group or not.


DSS > Administration > Security > Groups > doesn't seem to show the member of each group.

I looked into dsscli but I can't find a command there to show the members of a given group,

I guess I could use the REST API to list all users, get the info of each user, and compute the group membership myself but is that really the only option that I have?

Answers

  • Miguel Angel
    Miguel Angel Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 118 Dataiker
    Options

    Hi,

    You can indeed use the DSS Python API to get this information and format it to your business requirements.

    Nevertheless, from the DSS UI you can filter the users list based on group names. See for example:
    Capture.PNG

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,708 Neuron
    Options

    Run this on a Jupyter Notebook and you can download a CSV with all your users and their groups:

    import dataikuimport pandas as pd, numpy as npfrom dataiku import pandasutils as pduimport base64from IPython.display import display, HTMLclient = dataiku.api_client()users_list = client.list_users()df_user_groups = pd.DataFrame(columns=['user_id', 'group_name'])for user in users_list:for group in user['groups']:data_record = pd.DataFrame.from_dict({'user_id': [user['login']], 'group_name': [group]})df_user_groups = pd.concat([df_user_groups, data_record], ignore_index=True)def create_download_link( df, title = "Download CSV file", filename = "dataiku_user_groups.csv"):csv = df.to_csv()b64 = base64.b64encode(csv.encode())payload = b64.decode()html = '<a download="{filename}" href="data&colon;text/csv;base64,{payload}" target="_blank">{title}</a>'html = html.format(payload=payload,title=title,filename=filename)return HTML(html)create_download_link(df_user_groups)

    Add to a Python recipe and you can create a dataset with it for easy exploring. You could also create a WebApp that displays them.

  • marwa
    marwa Registered Posts: 3
    Options

    i tried this code , but have this error :

    name 'HTML' is not defined

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,708 Neuron
    Options

    My bad, it was missing an import, added it now:

    from IPython.display import display, HTML

Setup Info
    Tags
      Help me…