Skip to main content



No record found.

Microsoft Dynamics CRM forum

Binding a parameter to a Power BI Userrole with the liquid tag ?

Posted on by 5

Dear Sir,

I have published a Power BI embedded report in a CRM Portal with a Liquid tag.

The CustomerRole is a Power BI user role in DAX: CustomerName = "IBM"

{% powerbi authentication_type:"powerbiembedded" path:"" roles:userroles1 %}

This works just fine, the dashboard is filtered in the portal with IBM records.

But now a want to use the CustomerRole for dynamic RLS, so I use the Power BI DAX Userprincipalname () function. (through the embedded API it is just a string...)

I want to pass on the Customer "IBM" for example.

The CustomerRole is now a Dynamic RLS user role: CustomerName = Userprincipalname ()

Question: How can I bind the "IBM" parameter to the CustomerRole in the liquid tag ? So that the "IBM" filter is passed on to the Power BI Model to filter out the IBM records in the Power BI dashboard.

In Powershell for example the code looks like this:
$bodyRLS = "{'accessLevel': 'View', 'identities': [{'username': 'BlaBla','roles': ['CustomerRole'],'datasets': ['5ba066-07224171cfa5']}]}"

Hope you can shine a light on this.

Thanx in advanced.


  • Naresh123 Profile Picture
    Naresh123 10 on at
    RE: Binding a parameter to a Power BI Userrole with the liquid tag ?

    Hi Arthur,

    I have the same exact issue that I am trying to resolve. I am using userprincipalname too but I think we need to strip the domain name from the email address and use that for our filter(customer role) value which indeed would filter our dataset.

    I am struck at the same spot where you are, at the liquid tag binding.

    Please let me know if you made it work

    Helps a ton

    Thank you in advance

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans