cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatthiasG
Helper I
Helper I

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
v-litu-msft
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.

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,231)