Accessing the individual's username from Python recipe?

Solved!
info-rchitect
Level 6
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 6
Author

import dataiku

client = dataiku.api_client()

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

View solution in original post

2 Replies
info-rchitect
Level 6
Author

import dataiku

client = dataiku.api_client()

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

CoreyS
Dataiker Alumni

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