Forum Discussion
Unable to get RLS security to work with an “app owns data” embedded PBI using Azure Analysis Service
Thank you for the response Dale. I did review that documentation before posting to this forum but have not been able to figure out what I am doing wrong.
I've seen conflicting messages in posts and in the MSFT documentation, can you confirm:
1. Are roles supported in Azure Analysis Services when using PBI embed tokens? (RLS not defined in PBI)
2. Is CustomData supported in Azure Analysis Services when using PBI embed tokens?
Thanks!
Hi opensky
There are a couple of settings that you need to get right .
In the below representation of embed token "username" should always be the Master /service account which is a power bi pro account . The dataset in Power BI should be configured using this account .
"roles" attribute should contain the rolename that you have configured in your Azure AS model .
"Customdata" attribute should contain the username for whom you want to process the report.
The DAX expression for the AS ROLE should use CUSTOMDATA() function instead of USERNAME()
.
formData = {
"accessLevel": "View",
"identities": [
{
"username": master/Service account,
"roles": [ rolename ],
"customData":[email protected],
"datasets": [ datasetId ]
}
]
}