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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
JLParrish
Regular Visitor

Number of days returned by api admin/activityevents

We have been using the api for admin/activityevents to retrieve data.

GET https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime={startDateTime}&endDateTime={e...

Previously, we have been able to retrieve 29 days of data.  Recently, since 2025-02-13 or so, we are getting an error 

DataSource.Error: Web.Contents failed to get contents from 'https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='2025-01-23T00:00:00.000Z'&end...'' (400): Bad Request
Details:
DataSourceKind=Web
DataSourcePath=https://api.powerbi.com/v1.0/myorg/admin/activityevents
Url=https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='2025-01-23T00:00:00.000Z'&end...'

If we change the date parameter to 27 days, the api call is successful.  Has something changed?

1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
Community Support

Hi @JLParrish,

Thank you for reaching out to the Microsoft fabric community forum.

It looks like the number of days you can retrieve using the Admin API for activity events has recently changed. Previously, you were able to fetch 29 days of data, but now the API request fails when querying beyond 27 days.

  • Microsoft may have recently updated the retention period or the maximum query range for this API. While official documentation should confirm this, your observation suggests that the limit has been reduced.
  • The API may impose stricter validation on the date range, rejecting requests exceeding a certain limit. Try checking the Power BI REST API documentation for any recent changes.
  • If your retrieving 29 days of data was previously working but now fails, I recommend adjusting your queries to request data in smaller chunks (e.g; 27-day intervals) and then combining the results in Power BI.

If this helps, then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
Thank you.

View solution in original post

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hi @JLParrish,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

 

v-ssriganesh
Community Support
Community Support

Hi @JLParrish,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

v-ssriganesh
Community Support
Community Support

Hi @JLParrish,

Thank you for reaching out to the Microsoft fabric community forum.

It looks like the number of days you can retrieve using the Admin API for activity events has recently changed. Previously, you were able to fetch 29 days of data, but now the API request fails when querying beyond 27 days.

  • Microsoft may have recently updated the retention period or the maximum query range for this API. While official documentation should confirm this, your observation suggests that the limit has been reduced.
  • The API may impose stricter validation on the date range, rejecting requests exceeding a certain limit. Try checking the Power BI REST API documentation for any recent changes.
  • If your retrieving 29 days of data was previously working but now fails, I recommend adjusting your queries to request data in smaller chunks (e.g; 27-day intervals) and then combining the results in Power BI.

If this helps, then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
Thank you.

Hi @JLParrish,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.

lbendlin
Super User
Super User

You probably got more events now.  We have never been able to pull more than one day at a time.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.