Forum Discussion
Anyone know how to capture when a user triggers export in PBI Embedded?
Greetings, community. Hoping someone can help me out. We need to be able to track when a user performs an export in a PBI Embedded scenario. We are trying to leverage the native PBI export functionality but need to be able to know if/when a user actually performs the export operation.
Anyone have ideas and/or has implemented this previously?
RELATED THREAD: Is it possible to capture user performing Export i... - Microsoft Fabric Community
5 Replies
- AnonymousNot applicable
Hi arpost ,
Thanks for reaching out to the Microsoft Fabric Community forum.The challenge with the current native export experience in Power BI Embedded is that, while it allows users to export reports and data, it provides limited visibility into who actually performed the export. In many App Owns Data scenarios, the export operation is executed under the embedding application's context, making it difficult to reliably identify and audit the end user who initiated the action
As a workaround, you could consider replacing the native Power BI export functionality with a custom export button in your embedding application. When users initiate an export, the application can first capture and log relevant details such as the user identity, report ID, timestamp, filters, and export format into a database before calling the Power BI Export To File API. The application can then track the export job status and record whether it completed successfully. This approach helps address the limitation of the native embedded export experience, which supports exporting content but provides limited visibility into the actual end user who performed the export operation.
Please find steps on how to create Power BI export functionality in embedded scenario: Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
I hope this information helps. Please do let us know if you have any further queries.
Thank you- arpost
Post Prodigy
Thank you for the info, Anonymous. I was hoping there was a simpler solution as creating/maintaining custom export code adds some complexity and also adds another layer of security validation (e.g., make sure export API call/results are properly secured). Hurts me that there isn't a simpler solution baked in to the Power BI Embedded experience.
I did have some ideas for Microsoft on this that would streamline/reduce the LOE required of customers:
- Add EmbedTokenID to Power BI Audit Logs: This would make App-Owns-Data logs exponentially more useful since there'd be a way to link events together even without user context.
- Add Export Triggered Event Handler: This would be a HUGE add as it'd allow customers to know when an export was triggered; sad this isn't already a thing since there are so many other useful APIs.
- AnonymousNot applicable
Hi arpost ,
We really appreciate your efforts and for letting us know the update on the issue.
Thank you for posting your requirement in ideas forum, hoping it would get the community traction. Please continue using fabric community forum for your further assistance.
Regards
- masonreed11t
Advocate II
You could check the Power BI audit/activity logs for export events. In Embedded, capturing the native export click directly can be tricky, so a common approach is to use a custom export button with the JS SDK and log the action before triggering the export. This gives you better control over user, report, and timestamp tracking.
- arpost
Post Prodigy
Thanks for the reply, masonreed11t. I think this is the "workaround" we're going to have to settle on. May add them as options in the menu.
Feel free to upvote the following so this all gets made a bit easier: