Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello,
I'm a little stuck on implementing Dynamic RLS with multiple filters. For our scenario, I'd like to generate two reports.
To comprehend our security, a user is associated with a organizational unit (companycode, domaincode). A user also has one or more roles.
Our data model only has one table "ActiveAccidents". Which is a list of (you guessed it) active accidents. The table has fields CompanyCode, ReporterName and InvolveeName.
I'd like to create a report with dynamic RLS security, which filters the data:
I'd also like to create a report with dynamic RLS security, which filters the data:
Settings this up in Power BI desktop is quit straightforward.
But when generating the Embed Token. We always get following error message back:
request:
{
"datasets": [
{
"id": "3a96d9f8-...-11bba1f611a2"
}
],
"reports": [
{
"id": "d5c6f76b-...-8672d80a93ba"
}
],
"targetWorkspaces": [
{
"id": "beca21a6-...-17f65322eb31"
}
],
"identities": [
{
"username": "m.demo@demo.be",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"EMAIL"
]
},
{
"username": "Demo0",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"CompanyCode"
]
},
{
"username": "Demo",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"SystemCode"
]
},
{
"username": "Demo",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"DomainCode"
]
},
{
"username": "CustomSQLRoleA",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"DatabaseRole"
]
}
]
}
response:
Status: BadRequest (400)
Response: {
"error": {
"code": "InvalidRequest",
"message": "Multiple identities provided for dataset 3a96d9f8-...-11bba1f611a2"
}
}
This error message somewhat makes sense to us. But we have no idea how to approach it differently.
Our approach matches with what is suggested on https://docs.microsoft.com/en-us/power-bi/developer/embedded/embedded-row-level-security#applying-us... or https://docs.microsoft.com/en-us/power-bi/developer/embedded/cloud-rls#dynamic-security or https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
The limitations also don't mention that what we are trying wouldn't be supported.
Solved! Go to Solution.
HI @MaartenInc,
In fact, the role part allows you to use a list of values, you do not need to duplicate defined different roles with the same usernames. I think the error should be related to these duplicate usernames.
{
"datasets": [{
"id": "3a96d9f8-...-11bba1f611a2"
}],
"reports": [{
"id": "d5c6f76b-...-8672d80a93ba"
}],
"targetWorkspaces": [{
"id": "beca21a6-...-17f65322eb31"
}],
"identities": [{
"username": "m.demo@demo.be",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"EMAIL"
]
},
{
"username": "Demo",
"roles": ["SystemCode", "DomainCode", "CompanyCode"],
"datasets": [
"3a96d9f8-...-11bba1f611a2"
]
},
{
"username": "CustomSQLRoleA",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"DatabaseRole"
]
}
]
}
Regards,
Xiaoxin Sheng
HI @MaartenInc,
In fact, the role part allows you to use a list of values, you do not need to duplicate defined different roles with the same usernames. I think the error should be related to these duplicate usernames.
{
"datasets": [{
"id": "3a96d9f8-...-11bba1f611a2"
}],
"reports": [{
"id": "d5c6f76b-...-8672d80a93ba"
}],
"targetWorkspaces": [{
"id": "beca21a6-...-17f65322eb31"
}],
"identities": [{
"username": "m.demo@demo.be",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"EMAIL"
]
},
{
"username": "Demo",
"roles": ["SystemCode", "DomainCode", "CompanyCode"],
"datasets": [
"3a96d9f8-...-11bba1f611a2"
]
},
{
"username": "CustomSQLRoleA",
"datasets": [
"3a96d9f8-...-11bba1f611a2"
],
"roles": [
"DatabaseRole"
]
}
]
}
Regards,
Xiaoxin Sheng
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.