Forum Discussion
smpa01
1 year agoCommunity Champion
upn
Can databricks notebook return the current UPN (equiavalent DAX USERPRINCIPALNAME())?
select current_user()
returns
trusted-service-user which is not useable.
I need it to return the follow...
- 1 year ago
mssparkutils.env.getUser
nilendraFabric
1 year agoSuper User
Have you tried this
user = dbutils.notebook.entry_point.getDbutils().notebook().getContext().userName().get()
print(user)