User Profile
bansalpreeti88
New Member
Joined 1 year ago
User Widgets
Contributions
Re: Power Query is sending multiple requests when using Web.Contents
Thank you lbendlin for providing quick response and your time. v-achippa I am still looking for solution of this issue. As following setting doesn't work for me even in Power BI desktop application. It will be great if we can get further assistance. We have disabled data preview in the background and set parallel loading to 1.3.3KViews0likes3CommentsPower Query is sending multiple requests when using Web.Contents
Hi, We have a situation where a POST API call is followed by a GET call. We are using Web.Contents to create a POST API call to a GRAPH API. In the next step, we extract the ID from the response to make a GET API call to fetch records. However, we have noticed that Power Query is making multiple POST requests. We have disabled data preview in the background and set parallel loading to 1. Kindly help in resolving the issue. Our focus is to make a single POST call. Below is an example of the Power Query script: let access_token = "xxxx", GetId = () => let // Define the URL for the POST request url = "https://posturl1", // GRAPH API // Define the headers for the POST request headers = [ #"Content-Type" = "application/json", #"Authorization" = "Bearer " & access_token ], currTime = Text.From(DateTime.LocalNow()), // Define the body of the POST request body = "{ ""displayName"": """ & currTime & """, ""filterStartDateTime"": ""2025-02-24T07:02:00"", ""filterEndDateTime"": """ & currTime & """ }", // Convert the body to binary binaryBody = Text.ToBinary(body), // Make the POST request response = Web.Contents(url, [ Headers = headers, Content = binaryBody ]), // Parse the JSON response jsonResponse = Json.Document(response), // Extract the ID field from the JSON response extractedId = if Record.HasFields(jsonResponse, "id") then jsonResponse[id] else null in extractedId, ExtractedIdResult = try GetId() otherwise null, FetchRecords = () => OData.Feed( "https://geturl2/" & ExtractedIdResult & "/records", // GRAPHAPI [Authorization = "Bearer " & access_token], [ExcludedFromCacheKey = {"Authorization"}, ODataVersion = 4, Implementation = "2.0"] ), Records = if ExtractedIdResult <> null then let records = Function.InvokeAfter(FetchRecords, #duration(0,0,5,0)) // 5minute delay in records else #table({}, {}),Solved3.4KViews0likes6Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.