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
Husain
Advocate I
Advocate I

Get logged in user id for custom visual

Hi,

 

Is there a way to get userid info in Custom Visuals to restrict the use of Custom Visual to particular individuals?
I searched the forums and seems it is not yet supported.


https://community.powerbi.com/t5/Developer/Custom-Visual-get-current-user-and-report-page-id/td-p/13...

But then I see some of the paid visuals in the appstore like ZebraBI and Ultimate waterfall charts which have buying options per user. So I feel there is some way.

 

Could someone guide me?

@jppp @dm-p 

1 REPLY 1
dm-p
Super User
Super User

Hi @Husain,

No, the user ID is not available to the custom visual sandbox. The two visuals you've linked are also certfied, which means that they aren't doing any comms to external services (as this is something that in not allowed for certification).

I've not researched the act of commericalisation of custom visuals very heavily, as my intentions have always been to open-source them for others to learn from.

My guess would be that license checking is handled internally to the visual, possibly using a process like the one proposed here. If it is, then it's possible that the number of users licensed is entirely honour-based from the customer side, but the vendor will have terms of service that the customer could be in violation of if they are found to be exceeding this. Licenses might possibly have expiry dates and be issued on a regular basis to mitigate this also.

As MS leave the handling of commercial costs to the vendor (and some probably do handle this using external services), I'd suggest that if you want to know specifics about how this is being managed then you are probably best reaching out to the developers of specific visuals that you aspire to emulate to see if they are willing to share details on how they handle it.

Regards,

Daniel





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

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


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




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.