Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

(429): Too Many Requests: Power BI Audit log

Hello,

 

I have a code that brings data from Audit logs using Power bI API. It was working fine and bringing data for the last 30 days. However, a few weeks ago it stoped working properly though nothing has been changed on my side. I started to receive 429 error very very often when I am trying to retreve data for 30 days. If the proccess is not showing an error, once in a while, and kind of completed successfully, it shows the data maximium for 10-14 days. I am attaching the code below. Does anyone have an idea what is giong on? I need a solution that is entirely buld in PBI without Power Shell.

 

 

 

 

let
Source = List.Dates,
#"Invoked FunctionSource" = Source(Date.AddDays(DateTime.Date(DateTime.FixedLocalNow()), -30), 30, #duration(1, 0, 0, 0)),
#"Converted to Table" = Table.FromList(#"Invoked FunctionSource", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
#"Added Custom" = Table.AddColumn(#"Renamed Columns", "StartDate", each "'"
& Date.ToText([Date], "YYYY-MM-DD")
& "T00:00:00.000Z"
& "'"),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "EndDate", each "'"
& Date.ToText([Date], "YYYY-MM-DD")
& "T23:59:59.999Z"
& "'"),
#"Invoked Custom Function" = Table.AddColumn(#"Added Custom1", "GETActivity", each #"GET Activity"(BearerToken, [StartDate], [EndDate], null, 0, {})),
#"Expanded GETActivity" = Table.ExpandListColumn(#"Invoked Custom Function", "GETActivity"),
#"Expanded GETActivity1" = Table.ExpandRecordColumn(#"Expanded GETActivity", "GETActivity", {"Id", "RecordType", "CreationTime", "Operation", "OrganizationId", "UserType", "UserKey", "Workload", "UserId", "ClientIP", "UserAgent", "Activity", "ItemName", "WorkSpaceName", "DatasetName", "ReportName", "WorkspaceId", "ObjectId", "DatasetId", "ReportId", "IsSuccess", "ReportType", "RequestId", "ActivityId", "DistributionMethod", "ImportId", "ImportSource", "ImportType", "ImportDisplayName"}, {"Id", "RecordType", "CreationTime", "Operation", "OrganizationId", "UserType", "UserKey", "Workload", "UserId", "ClientIP", "UserAgent", "Activity", "ItemName", "WorkSpaceName", "DatasetName", "ReportName", "WorkspaceId", "ObjectId", "DatasetId", "ReportId", "IsSuccess", "ReportType", "RequestId", "ActivityId", "DistributionMethod", "ImportId", "ImportSource", "ImportType", "ImportDisplayName"}),
#"Filtered Rows" = Table.SelectRows(#"Expanded GETActivity1", each ([Id] <> null) and ([Operation] = "ViewReport")),
    #"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"ItemName", Order.Ascending}}),
    #"Added Report URL column" = Table.AddColumn(#"Sorted Rows", "Report URL from Acivity", each Text.Lower("https://app.powerbi.com/groups/"&[WorkspaceId]&"/reports/"&[ReportId]))
in
    #"Added Report URL column"

 

 

 

Thanks in advance!

6 Replies

  • v-xulin-mstf's avatar
    v-xulin-mstf
    Icon for Community Support rankCommunity Support

    Hi Anonymous,

     

    429 error is a common error that means 'Too Many Requests' sent so that the remote server has blocked these requests.

    I'd like to suggest you stop sending requests, then you can reduce send frequency.
    In addition,any other Power bi REST APIs running at same time? If this is a case, these limits of requests may mean total requests of same user id

    Please also take a look at the following link to confirm if your operations have met the limitations.

    Power BI REST API limitations - Power BI | Microsoft Docs

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, v-xulin-mstf !

       

      No other API requests are running at the same time and at all. This is the only report that calls an API (any API). And the weird part is that it was working properly with no errors for a month and then the errors start to appear. I am really not sure why as nothing has changed. Do you know the way I can see how many API calls have been made?