Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
admin_xlsior
Post Prodigy
Post Prodigy

How to get current Power BI Sign in ?

Hi guys,

 

How to get current Power BI Sign In ? I know there are USERNAME() and USERPRICIPALNAME(), but this is windows login. Inside Power BI, either it is Desktop or Service, we can sign in using different email.

 

Thanks,

1 ACCEPTED SOLUTION
pranit828
Community Champion
Community Champion

Hi @admin_xlsior 

These functions are the one which will give you the username.

Yes you are right, these functions return differently on Desktop and on Service, But they return the user's name who has signed in.

 

Create a blank .pbix file with these functions and publish it so see how it is displayed and then you can change as per requirement.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

5 REPLIES 5
pranit828
Community Champion
Community Champion

Hi @admin_xlsior 

These functions are the one which will give you the username.

Yes you are right, these functions return differently on Desktop and on Service, But they return the user's name who has signed in.

 

Create a blank .pbix file with these functions and publish it so see how it is displayed and then you can change as per requirement.





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Hi Pranit828,

 

Thanks, True. it only correct in Power BI Service.

negi007
Community Champion
Community Champion

@admin_xlsior  Hi not able to understand which user information you wish to see. We can use username() to view the login ID used for login and USERPRINCIPALNAME() to view the email id of the user. other than above two which info you wish to see




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Hi negi007,

 

Yes, exactly. USERNAME() will give me result of my login (windows login), for example when I log in my laptop is DOMAIN1\User1, so it will give that value. And with USERPRINCIPALNAME, it will give his email address, maybe user1@domain1.com

 

But when sign in to PowerBI, I'm using different email, lets say : user1@test.onmicrosoft.com, I want this instead windows user log in information.

 

Thanks.

@admin_xlsior USERPRINCIPALNAME() function will show the current email id of the person who has logged into the powerbi. Use this function, it will surely resolve your issue.




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.