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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Powerbi custom visual user details.

Hello,
I am looking for a solution to get the user details of the person that is logged in to the power bi and using my custom visual.  I am trying to get the user information from this object "powerbi.session.userinfo" (took it from some old answers) and I am assuming that "powerbi" is imported from " powerbi-visuals-api"(version 

3.8.4) but session does not exist in powerbi object.
Also, I can see that we have DAX functions. Are they available to us in custom visuals through the "powerbi-visuals-api"?
please let me know if I am missing something or not understanding things properly. I am a newbie in powerbi.

I know this question is asked before but I cannot see any certain answers.

Thanks in advance for your help!
1 REPLY 1
dm-p
Super User
Super User

Hi @Anonymous,

You're not able to get the user details through the power BI visuals APIs for privacy reasons.

Visuals can only see the data that is supplied to them from the main window, so you could supply this via a measure that utilises the desired DAX function to your visual's dataset, and users of your visual would have to supply this themselves if it's a requirement.

It could also be set as a visual property via conditional formatting (which may make more sense, as this would be a scalar value)... but would still need to be via a measure that can supply results of the DAX expression to the visual.

Regards,

Daniel





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

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.