Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am using PowerBI embedded to embed reports for my customers. I have one report per customer in the same workspace.
I want to know if there is any feature in PowerBI embedded, so that the embedded report would be different for each customer, without me having to explicitly state which reportID corresponds to which user, to get the embedUrl for the configured report?
(Would Power BI Embedded be able to detect which user has logged in, and embed the report for them automatically?)
Solved! Go to Solution.
Hi @Anonymous ,
Power BI Embedded does not have a built-in feature to automatically detect which user has logged in and embed the corresponding report for them. However, you can achieve this functionality by building it into your application.
In your application side:
1. Create a mapping between your users and the reports they should see. You can store this mapping in a database or other data store that your application can access. For example, you might have a table that maps user IDs to report IDs.
2. When a user logs in, your application can use the mapping to determine which report to embed for that user. For example, you might retrieve the user's ID from the authentication token and use it to look up the corresponding report ID in your mapping table.
3. Use the Power BI REST APIs to retrieve the embed URL for the appropriate report. You can use REST API Reports - Get Reports In Group - REST API to retrieve a list of reports in your workspace, and then use REST API Embed Token - Reports GenerateTokenInGroup - REST API to generate an embed token and embed URL for the appropriate report. You will need to authenticate your application to use the APIs. You can use Azure Active Directory to authenticate your application and obtain an access token to use with the APIs.
4. Use the Power BI JavaScript API to embed the report in your application. You can use the 'powerbi.embed' function to embed the report in your application. You will need to pass the embed URL and the access token obtained in step 3 to the 'powerbi.embed' function.
Power BI embedded analytics overview | Microsoft Learn
Best Regards
Hi @Anonymous ,
Power BI Embedded does not have a built-in feature to automatically detect which user has logged in and embed the corresponding report for them. However, you can achieve this functionality by building it into your application.
In your application side:
1. Create a mapping between your users and the reports they should see. You can store this mapping in a database or other data store that your application can access. For example, you might have a table that maps user IDs to report IDs.
2. When a user logs in, your application can use the mapping to determine which report to embed for that user. For example, you might retrieve the user's ID from the authentication token and use it to look up the corresponding report ID in your mapping table.
3. Use the Power BI REST APIs to retrieve the embed URL for the appropriate report. You can use REST API Reports - Get Reports In Group - REST API to retrieve a list of reports in your workspace, and then use REST API Embed Token - Reports GenerateTokenInGroup - REST API to generate an embed token and embed URL for the appropriate report. You will need to authenticate your application to use the APIs. You can use Azure Active Directory to authenticate your application and obtain an access token to use with the APIs.
4. Use the Power BI JavaScript API to embed the report in your application. You can use the 'powerbi.embed' function to embed the report in your application. You will need to pass the embed URL and the access token obtained in step 3 to the 'powerbi.embed' function.
Power BI embedded analytics overview | Microsoft Learn
Best Regards
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 6 | |
| 4 | |
| 4 | |
| 3 |