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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Session Length from Power BI Rest APIs

Hi everyone,

 

I am using the Power BI REST APIs to pull usage data across the Power BI tenant. Requirements I have not been able to meet are:

  • Calculating average session length on Power BI per user/workspace, report, etc.
  • Calculating maximum session length on Power BI per user/workspace, report, etc.

'Session' can be thought of as the length of time spent on Power BI per user/workspace, report, etc.. For example, how long is a user viewing a particular report.

 

I have reviewed the REST API documentation but have not found anything to help with this query: 

https://learn.microsoft.com/en-us/rest/api/power-bi/

 

The 'Get Activity Events' API only returns a column 'creationTime', and no indication of end time/session duration (see API documentation at the below link).

https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events

 

Is there a REST API or another method I can use to find this data?

 

Thank you in advance for your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

AFAIK, these part is not logged into the activity event logs. Normally these log only trace the operations start datetime and hard to trace the end datetime.

For your requirement, you may need to manually trace and analysis the detail event logs to remark the tags.

For example, user open a report and he do to another actions(e.g. logout, open another report, access and interact not related contents).

You can set a timeout duration to trace if user continue previous operations(if no related contents operation logs added), then you can consider the next event start time or the expired datetime(start time + timeout duration) as the end time about previous operation.

BTW, you can also try to submit an idea to add the exit log when leave from a report.

Microsoft Power BI ideas

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

AFAIK, these part is not logged into the activity event logs. Normally these log only trace the operations start datetime and hard to trace the end datetime.

For your requirement, you may need to manually trace and analysis the detail event logs to remark the tags.

For example, user open a report and he do to another actions(e.g. logout, open another report, access and interact not related contents).

You can set a timeout duration to trace if user continue previous operations(if no related contents operation logs added), then you can consider the next event start time or the expired datetime(start time + timeout duration) as the end time about previous operation.

BTW, you can also try to submit an idea to add the exit log when leave from a report.

Microsoft Power BI ideas

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.