Forum Discussion

sanketpathre's avatar
sanketpathre
New Member
3 years ago

How to check which context menu is click

Hello there,

I want to know which context menu is clicked, so that I can add some extra logs in backend that user perform on emeded reports. In fact, I want to log user detail who export data from PBI. So I want to capture, "Exporta Data" click button.
But I dont find any event which trigger on clicked of "Export data" menu or "Export" as shown in below screen shot.

  

 

 

I tried with below but it didnt work as it work only on Extened context menu buttons.

report.off('commandTriggered');
report.on('commandTriggered', function (event) {
debugger;
let data = event.detail;
console.log("commandTriggered - buttonClicked:\n", data);
});

Also below work with PBI report buttons not default "Export" as shown in 2nd screen shot above
//report.off("buttonClicked");
//report.on("buttonClicked", function (event) {
// debugger;
// let data = event.detail;
// console.log("Event - buttonClicked:\n", data);
//});


3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sanketpathre ,

     

    As far as I know, we can get the Power BI export event log from audit log.

    For reference: Search the audit log in the compliance portal

    Audit logging for Power BI isn't enabled by default. To search for Power BI activities in the audit log, you have to enable auditing in the Power BI admin portal. For instructions, see the "Audit logs" section in Power BI admin portal.

    For more details: View audit logs

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • sanketpathre's avatar
      sanketpathre
      New Member

      This wont help for my requirement. I want to track event on embedded report, client side, when client click on export data  menu -> Export.

  • Hi Anonymous ,
    Thanks for Info, But I have little different requirement.
    My requirement is to add extra log in backend who ever download/ export data from embeded PBI report visuals.
    So I want to check whether we can track "Export" click button in embeded report. So who ever Export Data, we can have log entry in our backend.
    Is there any way on client side to track such actions which define by PBI like "export data"?
    Is there any way to capture any action and its name on embedded report on cient side?