cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Random 401 error while creating ~7000 items in SPO

Hi,

 

we created a Flow which runs once per day. This flow deletes all items in a list, reads the content of a JSON file  and creates for each item in the JSON a new list item.

MatthiasG_0-1596186316108.png

I previously had to change the timeout behavior because of the high amount of calls to SPO. A few days later I discovered that i sometimes get an 401 error on a random item. The error looks like this:

{
  "error": {
    "code": 401,
    "source": "flow-apim-europe-001-northeurope-01.azure-apim.net",
    "clientRequestId": "b15be892-53c2-4629-b57d-87cd3711573c",
    "message": "The response is not in a JSON format.",
    "innerError": "Object reference not set to an instance of an object."
  }
}

 

This happens max. once per Flow Run and on random items. Maybe someone knows why this keeps happening.

Thanks for any help!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @MatthiasG,

 

OK, how about putting the Get file content and parse JSON action under the loop of delete items?

Annotation 2020-08-03 102766.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support
Community Support

Hi @MatthiasG,

 

What's your license currently using?

Cause Apply to each action will have different limits according to the license:

Apply to each items - Office 365 and Free licenses 5,000
Apply to each items - Plan 1, Plan 2, Per User, and Per Flow licenses 100,000

https://docs.microsoft.com/en-us/power-automate/limits-and-config#looping-and-debatching-limits

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your reply @v-litu-msft,

 

it's a Per User Plan. Sometimes the flow runs without problems. I think the license shouldn't be the Problem.

Hi @MatthiasG,

 

OK, how about putting the Get file content and parse JSON action under the loop of delete items?

Annotation 2020-08-03 102766.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @v-litu-msft,

i can't imagine how this should solve my problem, but I'll give it a try. If the error doesn't come up in the the next few days, I'll accept your answer as the solution.

Hi @MatthiasG,

 

Has your problem been solved?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Best Regards,
Community Support Team _ Lin Tu

Hi @v-litu-msft ,

 

we modified the flow a little bit. The flow now gets triggered by a http request with the data in the body. Right now it looks like the problem is solved. It looks like that the parallel branches really made a difference. 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (12,066)