Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rhadall
Engaged Sweeper II

Hi

I've been working through your Pro Tip blog to update info into custom fields and having an issue when it is looping through the results to update Lansweeper.

The first error was "AxiosError: Request failed with status code 429." which I think is due to too many requests being sent. So I've added a sleep component into the loop set to 1 second but it is still failing on the test run. I've had two different errors:
An error occured while performing this action: "503: Service Unavailable"
Unsupported connection properties AxiosError: Request failed with status code 400.

Any thoughts on how to resolve this?

The loop documentation references paginated API. Could this be the problem? The link to the quickstart help in the documentation does not go anywhere.

Thanks

10 REPLIES 10
Jacob_H
Lansweeper Employee
Lansweeper Employee

Hey All - I need to review this Pro-Tip flow (was my first go at a flow) - there's a few things that need fixing especially for larger environments -  one thing to do now is add  'operatingSystem eq 'Windows' and lastSyncDateTime ge 2024-01-01T00:00:00Z'   to the intune list devices filter.2025-07-15 00_08_33-Lansweeper.png

Vicente_SC
Moderator
Moderator

Yeah, as Jacob said, this is a current limitation listed here, that we are trying to improve in the next version.

For the case of the Edit Asset, it is limited today to 50 edits per minute. So, a sleep of 1,5 seconds between edits should be enough (adding the sleep before or after the edit shouldn't make a lot of difference).

The other option is adding a retry mechanism in the Edit asset action, with 60 seconds between attempts. You will still get the 429 error, but it will automatically retry after a minute. See an example of how to configure it in the screenshot

jlpc
Engaged Sweeper II

I was able to get this Flow working by putting in the 60 second retry. I'm only dealing with <300 devices so I did not go over the 15 minute timeout.

My major issue however is that the Flow appeared to remove all the devices from the Asset Group they were assigned to. This is a pretty serious bug.

Here is the log output for the loop:

Inside loop: loopOverMatchedAssets (Index 49)
2025-07-14 14:34:32
Too many requests, please try again later.

Inside loop: loopOverMatchedAssets (Index 49)
2025-07-14 14:34:32
An error occured while performing this action: "Too many requests, please try again later."

Inside loop: loopOverMatchedAssets (Index 49)
2025-07-14 14:34:32
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Inside loop: loopOverMatchedAssets (Index 55)
2025-07-14 14:35:39
upstream connect error or disconnect/reset before headers. reset reason: remote connection failure, transport failure reason: delayed connect error: Connection refused

Inside loop: loopOverMatchedAssets (Index 55)
2025-07-14 14:35:39
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Inside loop: loopOverMatchedAssets (Index 105)
2025-07-14 14:37:35
Unsupported connection properties AxiosError: Request failed with status code 429.

Inside loop: loopOverMatchedAssets (Index 105)
2025-07-14 14:37:35
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Inside loop: loopOverMatchedAssets (Index 155)
2025-07-14 14:39:10
Unsupported connection properties AxiosError: Request failed with status code 429.

Inside loop: loopOverMatchedAssets (Index 155)
2025-07-14 14:39:10
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Inside loop: loopOverMatchedAssets (Index 205)
2025-07-14 14:40:45
Unsupported connection properties AxiosError: Request failed with status code 429.

Inside loop: loopOverMatchedAssets (Index 205)
2025-07-14 14:40:45
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Inside loop: loopOverMatchedAssets (Index 255)
2025-07-14 14:42:25
Unsupported connection properties AxiosError: Request failed with status code 429.

Inside loop: loopOverMatchedAssets (Index 255)
2025-07-14 14:42:25
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Inside loop: loopOverMatchedAssets (Index 259)
2025-07-14 14:43:28
503: Service Unavailable
Inside loop: loopOverMatchedAssets (Index 259)

2025-07-14 14:43:28
An error occured while performing this action: "503: Service Unavailable"
Inside loop: loopOverMatchedAssets (Index 259)

2025-07-14 14:43:28
Step 'Update Matched Asset' retry 1 of 2 after delay of 60 seconds.

Jacob_H
Lansweeper Employee
Lansweeper Employee

now that's strange - the Pro-Tip I made uses only the 'add group members' component -  apologies if there is a bug - is there any way that you can recreate the issue and let us know?  I can't reproduce it.   Also I see that a later version of the Intune connector has 'Add Group Member' - instead of 'Add Group Members' - if we used that one instead, we wouldn't have to do all of that convoluted appending to the array/list etc.  I'll try that out when I get a free moment

jlpc
Engaged Sweeper II

Yeah it is strange. I've done some additional testing and it is definitely the "Update Matched Asset" component that is removing devices from the Asset Group. I even re-imported the Flow and did not change anything (except for the Client ID and Secret) and it still did it. I had initially updated the Intune and Loop connections but either way it still behaved the same.

I've attached a (zipped) video that shows what happens. I've cut it short as it would be too long, but once the flow finishes, all the devices are removed from the group.

Jacob_H
Lansweeper Employee
Lansweeper Employee

ooh!  i thought you meant the inTune group!  what's the logic behind that staff workstation view? 

jlpc
Engaged Sweeper II

Its actually a Lansweeper Asset group. I have manually added the devices to it.

rhadall
Engaged Sweeper II

Thanks for the further info. I'm hitting the 15 minute maximum for the workflow to run due to the number of assets to loop through, so I'll have to consider trying to break this down into smaller chunks for it to be able to complete.

Jacob_H
Lansweeper Employee
Lansweeper Employee

Hey Rhadall - yeah, the edit asset action is currently very inefficient (we are working on that) - try upping the sleep to 8 seconds (crazy, yes...)   and let me know how that goes.  You might have to wait 15 minutes after you get the AxiosError before trying again

Forum

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now