'Dynamic Row Level Security on Non Email Column
We are using embedded power bi reports in a portal. I have configured dynamic row-level security based on the user email column in all reports(useremail=userprincipalname()). Now there is a situation where I need to do dynamic row-level security on uid(B67f543SDGNG) instead of user email. Is there a way I can configure it?
I have tried uid=userprincipalname(), it's working in power bi desktop but when it is called from API/UI, a token is not generating and failing with 404 error. Any help is appreciated.
Thanks!
Solution 1:[1]
It will work fine with userprincipalname() in service also. Error is related to calling wrong API call you are embedding Report and calling Dashboard API. Make sure you are calling the right API. If you are embedding Report then there will be one API call for that, if embedding Dashboards, it will be different. You can find the correct API calls in the links below.
Please find the references here:
https://docs.microsoft.com/rest/api/power-bi/embed-token/reports-generate-token-for-create-in-group https://docs.microsoft.com/rest/api/power-bi/embed-token/dashboards-generate-token-in-group
Solution 2:[2]
This issue has been fixed by adding '@domain.com' to the uid.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kotana Sai |
| Solution 2 | ven |
