Sharepoint REST ValidateUpdateListItem return error response.

Nguyen, Phillip 1 Reputation point
2022-09-21T22:51:56.953+00:00

Hi all, any help would be appreciated
Thank you

SharePoint 2019 on-premise

I'm making a REST request using ValidateUpdateListItem to update Author and Editor; however, I'm getting an error message: Multiple entries matched; please click to resolve. In the response, the user with that email only has one record.

Note: Window's Authentication and Claims Web application configure for a single site collection.

Request:

_api/web/GetList(@path)/items(5)/ValidateUpdateListItem()?@path=%27/sites/Some Documents%27  
  
Formatted data  
{  
   "formValues":[  
      {  
         "__metadata":{  
            "type":"SP.ListItemFormUpdateValue"  
         },  
         "FieldName":"Created_x0020_By",  
         "FieldValue":"i:0e.t|original-issuer|******@noemail.com"  
      },  
      {  
         "__metadata":{  
            "type":"SP.ListItemFormUpdateValue"  
         },  
         "FieldName":"Author",  
         "FieldValue":"[{'Key':'******@noemail.com'}]"  
      },  
      {  
         "__metadata":{  
            "type":"SP.ListItemFormUpdateValue"  
         },  
         "FieldName":"Created",  
         "FieldValue":"09/15/2022 04:27 PM"  
      },  
      {  
         "__metadata":{  
            "type":"SP.ListItemFormUpdateValue"  
         },  
         "FieldName":"Modified_x0020_By",  
         "FieldValue":"i:0e.t|original-issuer|******@noemail.com"  
      },  
      {  
         "__metadata":{  
            "type":"SP.ListItemFormUpdateValue"  
         },  
         "FieldName":"Editor",  
         "FieldValue":"[{'Key':'******@noemail.com'}]"  
      },  
      {  
         "__metadata":{  
            "type":"SP.ListItemFormUpdateValue"  
         },  
         "FieldName":"Modified",  
         "FieldValue":"09/15/2022 04:27 PM"  
      }  
   ],  
   "bNewDocumentUpdate":true  
}  

Response:

{  
   "d":{  
      "ValidateUpdateListItem":{  
         "__metadata":{  
            "type":"Collection(SP.ListItemFormUpdateValue)"  
         },  
         "results":[  
            {  
               "ErrorMessage":null,  
               "FieldName":"Created_x0020_By",  
               "FieldValue":"i:0e.t|original-issuer|******@noemail.com",  
               "HasException":false  
            },  
            {  
               "ErrorMessage":"Multiple entries matched, please click to resolve.",  
               "FieldName":"Author",  
               "FieldValue":"[{'Key':'******@noemail.com'}]",  
               "HasException":true  
            },  
            {  
               "ErrorMessage":null,  
               "FieldName":"Created",  
               "FieldValue":"09/15/2022 04:27 PM",  
               "HasException":false  
            },  
            {  
               "ErrorMessage":null,  
               "FieldName":"Modified_x0020_By",  
               "FieldValue":"i:0e.t|original-issuer|******@noemail.com",  
               "HasException":false  
            },  
            {  
               "ErrorMessage":"Multiple entries matched, please click to resolve.",  
               "FieldName":"Editor",  
               "FieldValue":"[{'Key':'******@noemail.com'}]",  
               "HasException":true  
            },  
            {  
               "ErrorMessage":null,  
               "FieldName":"Modified",  
               "FieldValue":"09/15/2022 04:27 PM",  
               "HasException":false  
            }  
         ]  
      }  
   }  
}  
Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
Microsoft 365 and Office SharePoint Server Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-09-22T05:52:36.25+00:00

    Hi @Nguyen, Phillip
    In your request, You have both Created_x0020_By and Author, Modified_x0020_By and Editor. You have repeatedly updated the Author and Editor field. This might cause Multiple entries matched, please click to resolve..
    Please refer to following request to update Author and Editor.

    {  
          "formValues": [  
                {  
                      "__metadata": { "type": "SP.ListItemFormUpdateValue" },  
                      "FieldName": "Editor",  
                      "FieldValue": "[{'Key':'i:0#.w|******@testdomain.com'}]"  
                },  
                {  
                      "__metadata": { "type": "SP.ListItemFormUpdateValue" },  
                      "FieldName": "Author",  
                      "FieldValue": "[{'Key':'i:0#.w|******@testdomain.com'}]"  
                }  
          ],  
          "bNewDocumentUpdate": true  
    }  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



  2. Ganesh Sanap 211 Reputation points
    2022-09-22T06:15:53.68+00:00

    You need to use LoginName instead of email for Author and Editor field.

    Try using field value in this format for Author and Editor fields:

    "FieldValue":"[{'Key':'i:0e.t|original-issuer|******@noemail.com'}]"  
    

    OR

    "FieldValue":"[{'Key':'i:0#.f|membership|******@contoso.com'}]"  
    
    
     
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.