New Power BI Embedded code samples available in April 2019
Published date: April 10, 2019
New samples are available in our GitHub repository:
- ASP .NET core sample– starting SDK version 2.1.0, we now support .NET core 2.0 apps development. The sample shows basic flow of embedding for Power BI users (‘User owns data’), using .NET core. The sample can be applied to use ‘App owns data’ scenario, just add the relevant code that generates an embed token, once you acquire an AAD token.
- Node.js code snippets– for developers building applications based on Node.js, we added some code snippets for the most common usages in embedded scenario-
o ‘get reports’- return all the reports in a given workspace
o ‘generate embed token’- generating an embed token for a report, that can be used to embed from within the application.
o ‘generate embed token with RLS’- script that generates an embed token with row-level security applied in the token.
- Service principal sample app– the ‘App owns data’ sample app, that shows how to embed for non-Power BI users, have been extended to include the authorization of a Service principal. See comments in the code on how to switch between service principal and a ‘master’ user.