Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi,
Is there a way to use Dataiku's Python API to get the list of login users info (Login, Type, Groups, etc) posted in Administration/Security/Users?
Thanks,
Hi,
You can indeed use the Python API to access user related information.
There is a specific section for users and groups that you can check here: https://developer.dataiku.com/latest/api-reference/python/users-groups.html#users-and-groups
For example:
import dataiku
client=dataiku.api_client()
users=client.list_users()
for i in users:
print("----------")
myuser=client.get_user(i['login'])
print("Login name: ",i['login'])
print("Display name: ",i['displayName'])
print("Type: ",i['sourceType'])
try: print("Email: ",i['email'])
except: print("Email: N/A")
print("Groups :",i['groups'])
print("Last successful login: ", myuser.get_activity().last_successful_login)
Feel free to modify this example snippet to suit your business requirements. Please note that depending on your DSS version the exact commands syntax may vary.
Hi,
You can indeed use the Python API to access user related information.
There is a specific section for users and groups that you can check here: https://developer.dataiku.com/latest/api-reference/python/users-groups.html#users-and-groups
For example:
import dataiku
client=dataiku.api_client()
users=client.list_users()
for i in users:
print("----------")
myuser=client.get_user(i['login'])
print("Login name: ",i['login'])
print("Display name: ",i['displayName'])
print("Type: ",i['sourceType'])
try: print("Email: ",i['email'])
except: print("Email: N/A")
print("Groups :",i['groups'])
print("Last successful login: ", myuser.get_activity().last_successful_login)
Feel free to modify this example snippet to suit your business requirements. Please note that depending on your DSS version the exact commands syntax may vary.
Thanks, that is exactly what I am looking for.