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
Fabric Notebooks execute under a service identity rather than the context of an individual user.
thats why When you run a statement such as `select current_user()`, the output is the service account (“trusted-service-user”) rather than the individual’s email address
This is a known limitation which has been discussed here in forum and enhancements to be made to the mssparkutils package.
smpa01
1 year agoCommunity Champion
mssparkutils.env.getUser
- nilendraFabric1 year agoSuper User
Thanks for sharing this. I haven't tried this 🙂