Forum Discussion
RLS for external B2C users
- 1 year ago
Hi Etsu0612,
Thanks for posting your query in Microsoft fabric community forum.Firstly, I would like to acknowledge pallavi_r for the helpful response regarding guest users (Azure AD B2B) that is indeed a common approach for external user access in Power BI.
However, as you’ve clarified that your external users will remain in Azure AD B2C and won’t be added as guest users in your organization's directory, your setup requires a slightly different approach to ensure RLS (Row-Level Security) works effectively when embedding Power BI content in your Power Pages portal. Below are some considerations:
- Since Azure AD B2C users authenticate through a separate identity provider, the behaviour of USERPRINCIPALNAME() may not align with standard Azure AD users.
- Instead, for Power BI Embedded scenarios, it is common to use an embedding approach with an "App Owns Data" model.
- You can generate an embed token for each external B2C user and pass their unique identifier (e.g., email, username, or a custom claim) using the Effective Identity property.
- Your RLS filter logic should then match this identifier against your data model, often using USERNAME() or a custom claim instead of USERPRINCIPALNAME().
For detailed guidance, you can refer to these articles:
If this helps, then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
Thank you.
Hi Etsu0612,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.