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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

display portal's user name in an embedded power bi report

Hi,

Is there any way possible to display portal's user name ,in which the power bi report has embedded, on the report? 

 

Thanks

6 REPLIES 6
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ,

As  @amitchandak  said, you could create a measure.

Measure = USERPRINCIPALNAME()

then add it into card adn publish ->embeded.

vyalanwumsft_0-1657001036378.png

The final show:

vyalanwumsft_1-1657001081556.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi @v-yalanwu-msft ,

 

I have already done that in the report but this is not the ask actually. the users on the embedded portal are not power bi users. how to display such users on the embedded report when they navigate the embedded report.

 

Thanks

@Anonymous Check this link it might help you.

Learn more on using row-level security for embedding

 

Tlotly
Helper V
Helper V

@Anonymous  use this:  USERNAME()

If you want to personalise it, you can use the one below and you can change it to whatever suits your needs. I used this measure. As long as you have a user list as part of your tables. Other the measure will return a username:

personalised greeting:

Greeting =
var user = USERPRINCIPALNAME()
var vFirstNameDigit = SEARCH("@",USERPRINCIPALNAME())-1
var vFirstName = LEFT(USERPRINCIPALNAME(),vFirstNameDigit)
var BMname = LOOKUPVALUE(BranchUsers[Name], BranchUsers[UPN], USERPRINCIPALNAME())
var BMsurname = LOOKUPVALUE(BranchUsers[Surname], BranchUsers[UPN], USERPRINCIPALNAME())
var display1 = IF(ISBLANK(BMname),vFirstName, BMname)
var hour = HOUR(NOW())
var minute = MINUTE(NOW())
var prefix = SWITCH(
TRUE(),
hour<12,"Good morning, ",
hour>=12 && hour<17,"Good afternoon, ",
"Good evening, "
)
RETURN CONCATENATE(prefix,display1)

 

returns a name: user is part of the user list on the report

Tlotly_1-1656591457547.png

returns username: user not part of user's list on the report

Tlotly_0-1656591300109.png

 

Anonymous
Not applicable

Hi @Tlotly @amitchandak ,

 

Sorry i forgot to mention in the post that the users in the portal are not the power bi users and they do not have Power BI license. They simply logged in the portal, using the portal's credentials, and access the embedded report. 

How to display those user's name in the power bi report? 

 

Thanks

amitchandak
Super User
Super User

@Anonymous , userprincipalname and username can be passed with values of you choice in case of embedded , you should be get the values using that

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.