cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate I
Advocate I

Azure Analysis Services RLS and Embedding

We would like to embed reports with RLS but I'm starting to get the feeling that is not possible with Analysis Services(both Azure and on premise) using live connection in Power BI.

 

We started with on-premise analysis service (live connection) but that is not supported according to the following document:

https://docs.microsoft.com/en-us/azure/power-bi-embedded/power-bi-embedded-connect-datasource

 

Therefore, we moved the data to Azure and now we have Azure Analysis Service live connection and would like to embed that with RLS.

 

We are having problems implementing this and on the following webpage there is a note saying that Analysis Services live connections are not supported:

https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-embedded-rls/

 

Is this really the case and if so when can we expect to embed RLS Power Bi reports with Analysis Service data (live connection)? Is this on the roadmap?

 

Btw, we are working with big datasets so using import instead of live connection is not really an option for us.

1 ACCEPTED SOLUTION
Advocate I
Advocate I

I finally got this to work with PowerBi Embedding and RLS using the followingt instructions:

https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#working-with-analysi...

 

Make sure that you use Customdata DAX funtion to filter the data and also that add an Azure user to the Role:

=INS_TABLE[column] = Customdata()

 

I used the sample project found here:
https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-customers#embed-your-content-us...

 

with the following modification:

// Generate Embed Token for reports without effective identities.
var rls = new EffectiveIdentity("xxxAzureUserName", new List<string> { report.DatasetId }, new List<string>() { "SchoolFiltering" }, "SchoolName");

generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view", identities: new List<EffectiveIdentity> { rls });

 

Hope this helps

 

 

View solution in original post

28 REPLIES 28
Advocate I
Advocate I

I finally got this to work with PowerBi Embedding and RLS using the followingt instructions:

https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#working-with-analysi...

 

Make sure that you use Customdata DAX funtion to filter the data and also that add an Azure user to the Role:

=INS_TABLE[column] = Customdata()

 

I used the sample project found here:
https://docs.microsoft.com/en-us/power-bi/developer/embed-sample-for-customers#embed-your-content-us...

 

with the following modification:

// Generate Embed Token for reports without effective identities.
var rls = new EffectiveIdentity("xxxAzureUserName", new List<string> { report.DatasetId }, new List<string>() { "SchoolFiltering" }, "SchoolName");

generateTokenRequestParameters = new GenerateTokenRequest(accessLevel: "view", identities: new List<EffectiveIdentity> { rls });

 

Hope this helps

 

 

View solution in original post

Thanks for the post. I have simillar scnerio where in embedded mode I need to display PowerBi report and Powerbi is consuming data from Azure analasis Services. I need to filter data from analysis services based on RLS rule (AccountID). Not getting how you have specified CustomeData() function. Can you please pass on any sample? thanks.

Hi,

 

 

The method works like this:

=TABLENAME[COLUMNNAME] = Customdata()

 

In your case it might look something like this:

=ACCOUNTS[ACCOUNTID] = Customdata()

 

Hope this helps 🙂

I am using PBI App Owns data, Azure Analysis Services Live Connection, and Azure Active Directory.

 

In order to pass through an EffectiveIdentity and have RLS applied to the resulting report  using a UPN and to avoid the following error

 

"Creating embed token for accessing dataset xxxxxxxxxxxxxxxxxx requries effective identity username to be identical to the caller's principal name”

 

do I need to use the CustomData() function and add a row filter to my roles in Azure Analysis services to enforce this?

 

@Valtyr  @nimrod  @u02cm62  @Eric_Zhang 

I finally got this resolved and posted my solution on my question thread.

Resolver I
Resolver I

We have it working for on premise SSAS 2017, AppOwnsData, live connections and embedded in Salesforce with an Azure web app.

 

SSAS Paas (Azure AS) i felt wasn't ready yet for RLS which is why we held off.  Are you only concerned with Azure AS with AppOwnsData and live connections?

Hello u02cm62,

 

At this moment I am trying to setup RLS in Power BI Embedded (in a portal) using on premise SSAS, AppOnwsData, Live connection with a multidimensional cube.

 

Could you tell how to setup? I tried with CustomData() but according to this site, it's not possible when you are not having a Azure Analysis Services: https://docs.microsoft.com/nl-nl/power-bi/developer/embedded-row-level-security#on-premises-data-gat...:

Using the CustomData feature

The CustomData feature only works for models that lie in Azure Analysis Services, and it only works in Connect live mode. Unlike users and roles, the Custom data feature can't be set inside a .pbix file. When generating a token with the Custom data feature, you need to have a username.

 

I posted my question online, but got no responses. It's hard to find any information about how this works.

 

Thanks in advance

 

@u02cm62

 

We are currently only concerned about Azure AS with AppOwnsData and live connection but it is good to hear that it works for On-Premise.  We will probably have to go down that route until the azure live connection is fully supported. 

As mentioned in my previous comment, we will go live with CustomData support for AAS using live connection.

CustomData funciton can be used for RLS as well.

Hi,

 

Any updates on ETA  when the Custom data will be supported in AAS?

Hi,

PBIE supports RLS on AS Live connection. You can see it here- https://docs.microsoft.com/en-us/power-bi/developer/embedded-row-level-security#working-with-analysi....


In addition, We support filtering by pre-defined roles in AAS.
And- we will release within a month support of filtering by CustomData in AAS.

 

@nimrod

 

As mentioned in the limitations in the link you sent this is only supported for On-Premise:

    -analysis Services live connections are supported for on-premises servers.

 

Can you give us any insights on when this will be fully supported for Azure analysis service?

Regular Visitor

I'm having the same issue, and I thought I was doing something wrong (the documentation is not great), but apparently it's a lack in the service.. Like everyone else in this thread, I would also love to get more info on future plans for support.

 

Edit:

I create a feedback entry for this issue at feedback.azure.com, feel free to upvote it, that way maybe we can get some attention on this: 

https://feedback.azure.com/forums/34192--general-feedback/suggestions/32984296-embed-rls-power-bi-re...

I've heard vague rumours that this might be support in Q1 2018. I would like to get that confirmed but I'm not sure where to get a proper answer. 

Are all these about only Azure AS or also about on premise AS 2017? The first post said both were tried but that was Oct and in Oct it wasn't ready for RLS, but came out shortly thereafter for changes in the web app. We are using SSAS 2017 on premise because we felt Azure AS didn't have RLS working yet.  We are using AppOwnsData model and have RLS and using live connections to tabular cubes on premise, but we display these through the gateway on Salesforce and it works fine.  Is this only a problem with Azure AS?  It would be good to know as we want to go there, but felt it wasn't ready for prime time yet.

New Member

I have the same issue. Does anyone have any updates about it?

New Member

I have the same issue. Does anyone have any updated about this issue?

Regular Visitor

We are experiencing the same issue. When will this be supported?
Advocate III
Advocate III

Im facing exactly the same issue.  Very little support for those paying the most in licencing costs........

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors