Advertisements

Send an HTTP request to SharePoint action in Microsoft Flow, Common error messages

This post is part of my User guide to using the SharePoint REST API in Microsoft Flow for no-code developers series.

When you first start to use the Send an HTTP request to SharePoint action in Microsoft Flow you might run into failures. These failures aren’t always easy to understand. To help resolve common issues I’m collecting failures in this post. If you find any errors yourself then please leave as comment below and I will add it to the list of common error messages.

 

Conflict – The file XYZ.docx has been modified by i:0#.f|membership|microsoft.flow@domain.com

Within the run history you are likely to see the following message:

[code lang=text]
{
"message": "The file XYZ.xlsx has been modified by i:0#.f|membership|microsoft.flow@domain.com on 29 Aug 2018 00:54:36 -0700.\r\nclientRequestId: cd61f2ca-dce1-4416-8e7f-02aa43406b66\r\nserviceRequestId: a26d899e-20d6-6000-3dc9-ccb5d34431bd",
"status": 409,
"source": "https:/ /tenant.sharepoint.com/sites/mysitename/_api/web/lists/GetByTitle('Docs')/items(1729)",
"errors": [
"-2130575305",
"Microsoft.SharePoint.SPException"
]
}
[/code]

Explanation

Quite often you can ignore these errors. The file mentioned is likely to be updated by your flow at the same time by multiple instances of the flow.  The failing flow is trying to update the file while a second instance of the flow is trying to update the file too. As long as you have flows that are triggered by the modification of the document you should be ok. If you have multiple flow instances trying to update the document at the same time you will find that the other instance is successful.

 

423 –  the file XYZ.docx is locked for shared use by

Within the run history you are likely to see the following message:

[code lang=text]
{
"status": 423,
"message": "The file \"https:/ /tenant.sharepoint.com/sites/mysitename/Docs/XYZ.xlsx\" is locked for shared use by firstname.surname@domain.com.\r\nclientRequestId: fc60a27e-58ac-42ae-826e-f57c07e2814a\r\nserviceRequestId: c7ed869e-7033-6000-a8d4-a810c33de57d",
"source": "https:/ /tenant.sharepoint.com/sites/mysitename/_api/web/lists/GetByTitle('Docs')/items(7006),
"errors": [
"-2147018894",
"Microsoft.SharePoint.SPException"
]
}
[/code]

Explanation

When you get the 423 errors, there will be a user that is still updating a document while your flow is trying to update the document too. As long as the user is still saving the document after this failure you should be ok.

 

NotFound – Item does not exist. It may have been deleted by another user

Within the run history you are likely to see the following message:

[code lang=text]
{
"message": "Item does not exist. It may have been deleted by another user.\r\nclientRequestId: 34fee8b7-f1ba-4ae1-b8c5-d8079dee170d\r\nserviceRequestId: 9b07839e-6074-6000-3dc9-c9e30f8711e6",
"status": 404,
"source": "https:/ /domain.sharepoint.com/sites/mysitename/_api/web/lists/GetByTitle('Docs')/items(12649)",
"errors": [
"-2130575338",
"System.ArgumentException"
]
}
[/code]

Explanation

There can be multiple reasons for this error. The most obvious reason is that the document that Flow is trying to update has been deleted. Alternatively Flow might not have the right permissions to the document.

 

NotFound – Cannot find resource for the request

Within the run history you are likely to see the following message:

[code lang=text]
{
“status”: 404,
“message”: “Cannot find resource for the request SP.UserProfiles.PeopleManager1.\r\nclientRequestId: 826a48a2-411a-4429-805c-fc0aebbcb118\r\nserviceRequestId: 68d2899e-203d-7000-4795-992bcde30305″,
“source”: “https:/ /pieterveenstratriaddev.sharepoint.com/_api/SP.UserProfiles.PeopleManager1″,
“errors”: [
“-1”,
“Microsoft.SharePoint.Client.ResourceNotFoundException”
]
}
[/code]

Explanation

Well, you made a typo!

The Uri in the Send an HTTP request to SharePoint action is not correct.

BadRequest – An unexpected ‘EndOfInput’ node was found when reading from the JSON reader. A ‘StartObject’ node was expected

Within the run history you are likely to see the following message:

[code lang=text]
{
“message”: “An unexpected ‘EndOfInput’ node was found when reading from the JSON reader. A ‘StartObject’ node was expected.\r\nclientRequestId: f53b5263-4714-49ae-9e19-6f93d8acb570\r\nserviceRequestId: 92d2899e-20ba-7000-498f-8f42cb18b097″,
“status”: 400,
“source”: “https:/ /pieterveenstratriaddev.sharepoint.com/_api/web/lists”,
“errors”: [
“-1”,
“Microsoft.SharePoint.Client.InvalidClientQueryException”
]
}
[/code]

Explanation

This happens when you call /_api/web/lists using a POST Method instead of the get method. This method does exist however the REST API would expect you to supply the information for a list that needs to be created. If you’re just planning to get the lists in a site then you should use POST instead.

 

BadRequest – Passing in an empty or null value of parameter

Within the run history you are likely to see the following message:

[code lang=text]
{
"status": 400,
"message": "Passing in an empty or null value of parameter 'strTitle'\r\nclientRequestId: 69215962-d608-4b32-a796-272d45324b0f\r\nserviceRequestId: 08d3899e-a0f8-7000-4795-9534adca2029",
"source": "https:/ /pieterveenstratriaddev.sharepoint.com/_api/web/lists",
"errors": [
"-2147024809",
"System.ArgumentException"
]
}
[/code]

Explanation

You get this error when you try to send data in the body to SharePoint, however the format of the body is incorrect.

 

BadRequest – The property ‘strTitle’ does not exist on type ‘SP.List’. Make sure to only use property names that are defined by the type.

Within the run history you are likely to see the following message:

[code lang=text]
{
"status": 400,
"message": "The property 'strTitle' does not exist on type 'SP.List'. Make sure to only use property names that are defined by the type.\r\nclientRequestId: bddcf9dd-56b2-405c-8fd9-8a0d81ab1fbc\r\nserviceRequestId: 30d3899e-a0ef-7000-4795-97d42b59dc1a",
"source": "https:/ /pieterveenstratriaddev.sharepoint.com/_api/web/lists",
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}
[/code]

Explanation

When I get these kind of messages I would visit the Url mentioned (https:/ /pieterveenstratriaddev.sharepoint.com/_api/web/lists) in my browser. Then quite quickly you can see which data is expected in the body of your HTTP request. most often this error will occur by having used incorrect fieldnames.

 

BadRequest – Invalid JSON. The property name ” is not valid. The name of a property cannot be empty

Within the run history you are likely to see the following message:

[code lang=text]
{
"status": 400,
"message": "Invalid JSON. The property name '' is not valid. The name of a property cannot be empty.\r\nclientRequestId: 12e6fc99-a099-41c3-b6ed-2e91bb057d77\r\nserviceRequestId: 64d3899e-505f-7000-4795-9f6595243474",
"source": "https:/ /pieterveenstratriaddev.sharepoint.com/_api/web/lists",
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}
[/code]

Explanation

This is one of my favourites! If you get to experience this problem it is likely that you have been using copy/paste to create your HTTP request body. This has happened to me in the past where I copied configurations from blog posts and each quote (‘)was replaced by a backquote/backtick (`)

 

Advertisements

4 thoughts on “Send an HTTP request to SharePoint action in Microsoft Flow, Common error messages

  1. Hi Pieter, came across your blog from searching on 400 error in Flow. I’m trying to call Flow on an Access Request list, and getting this 400 error: “Permission Level Requested” is not supported.

    If you have any idea on how to bypass/correct that, it would be huge in getting notification on site Access Request invite update! Thanks in advance if anything comes to mind!

  2. Hi Pieter, I try to move Documents from one Sitecollection to another and get this error code: error 400 “Source file not set\r\nclientRequestId: e042f8f1-8d87-45eb-a854-05896f490943\r\nserviceRequestId: e042f8f1-8d87-45eb-a854-05896f490943”

    Can you help me with it?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: