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
bstripp
Frequent Visitor

DAX function to determine/display a SSAS Role?

Currently we are using Power BI with a Live Connection for our reporting.  

 

Row level security is performed via SSAS roles.  Visualization is embedded from a Webpage and called with the Microsoft API.  So far things are working as expected.  However, I am trying to find out how I would display to the user what Role they have withing DAX/PowerBI.

 

There are the following authentication functions:

USERNAME() - Doesn't work for us since we are using a service account for all calls

CUSTOMDATA() - This could be used, but seems redundant if I already have a role assigned to me

 

Is there any other way to display which Roles a user to my Page has?

 

A ROLE() command would be brilliant, but as far as I can tell, doesn't exist.

 

Thoughts?

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @bstripp,

Is there any other way to display which Roles a user to my Page has?

As far as I know, there isn't a way to do it with live connection currently.

A ROLE() command would be brilliant, but as far as I can tell, doesn't exist.

I would suggest you add it as an idea on Power BI Ideas forum to improve Power BI on this feature. Smiley Happy

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Employee
Employee

Hi @bstripp,

Is there any other way to display which Roles a user to my Page has?

As far as I know, there isn't a way to do it with live connection currently.

A ROLE() command would be brilliant, but as far as I can tell, doesn't exist.

I would suggest you add it as an idea on Power BI Ideas forum to improve Power BI on this feature. Smiley Happy

 

Regards

Thanks.  I have come to the same conclusion.

 

I'm having to come up with code to populate the CUSTOMDATA field to pass roles.  It's ugly and not an elegant solution, but it's working at the moment.  Considering they let us expose both USERNAME and CUSTOMDATA it's a suprise that we can't get the roles that the current user is assigned.

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.

Top Solution Authors