Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
SNPPowerbi
Regular Visitor

How to implement RLS using AAD/AD in Embedded reports

Hi,

 

Have generated powerbi report, want to integrate with custom application. Where i want to implement Row Level security in my embedded report using AAD.

 

Do not want to use database authentication mode

 

Please suggest me the solution for the same.

 

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @SNPPowerbi,

Power BI Embedded doesn't depend on the Azure AD account or windows account. You can use your favorite authentication (forms auth, basic auth, etc) in your app, and you can combine these account with Power BI RLS. 

First, you must understand how the Power BI Embedded works and how the access token (which is used for embedding reports) is used.

After your app authenticate the user, your app should determine what role is needed, and use the following json/PHP/.Net(it depends on your custom app) string as the input of access token signature. For example, add the RSL(highlighted in bold) in json string:

{
  "wid":"{workspace id}",
  "rid":"{report id}",
  "wcn":"{workspace collection name}",
  "iss":"PowerBISDK",
  "ver":"0.2.0",
  "aud":"https://analysis.windows.net/powerbi/api",
  "nbf":{start time of token expiration},
  "exp":{end time of token expiration},
  "roles":"{role names (multiple) delimited by comma}",
  "username":"{user name}"
}


For more details, you can review the following articles.

Works with Row Level Security in Power BI and Power BI Embedded
How to use Power BI Embedded via REST
Row level security with Power BI Embedded

Best Regards,
Angelia 

View solution in original post

1 REPLY 1
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @SNPPowerbi,

Power BI Embedded doesn't depend on the Azure AD account or windows account. You can use your favorite authentication (forms auth, basic auth, etc) in your app, and you can combine these account with Power BI RLS. 

First, you must understand how the Power BI Embedded works and how the access token (which is used for embedding reports) is used.

After your app authenticate the user, your app should determine what role is needed, and use the following json/PHP/.Net(it depends on your custom app) string as the input of access token signature. For example, add the RSL(highlighted in bold) in json string:

{
  "wid":"{workspace id}",
  "rid":"{report id}",
  "wcn":"{workspace collection name}",
  "iss":"PowerBISDK",
  "ver":"0.2.0",
  "aud":"https://analysis.windows.net/powerbi/api",
  "nbf":{start time of token expiration},
  "exp":{end time of token expiration},
  "roles":"{role names (multiple) delimited by comma}",
  "username":"{user name}"
}


For more details, you can review the following articles.

Works with Row Level Security in Power BI and Power BI Embedded
How to use Power BI Embedded via REST
Row level security with Power BI Embedded

Best Regards,
Angelia 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.