Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

Accessing the individual's username from Python recipe?

Solved!
info-rchitect
Level 5
Accessing the individual's username from Python recipe?

Hi,

 

I am trying to access the individual user's username in a Python recipe.

 

username = getpass.getuser()

 

It returns an admin type of username.  How can I access the correct username of the actual individual?


Operating system used: Windows 10

0 Kudos
1 Solution
info-rchitect
Level 5
Author

import dataiku

client = dataiku.api_client()

username = client.get_auth_info()['authIdentifier']

View solution in original post

2 Replies
info-rchitect
Level 5
Author

import dataiku

client = dataiku.api_client()

username = client.get_auth_info()['authIdentifier']

CoreyS
Community Manager
Community Manager

Thank you for sharing your solution with the community @info-rchitect!

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as ‘Accepted Solution’ to help others like you!
0 Kudos