0

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|[email protected]"
      },
      {
         "__metadata":{
            "type":"SP.ListItemFormUpdateValue"
         },
         "FieldName":"Author",
         "FieldValue":"[{'Key':'[email protected]'}]"
      },
      {
         "__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|[email protected]"
      },
      {
         "__metadata":{
            "type":"SP.ListItemFormUpdateValue"
         },
         "FieldName":"Editor",
         "FieldValue":"[{'Key':'[email protected]'}]"
      },
      {
         "__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|[email protected]",
               "HasException":false
            },
            {
               "ErrorMessage":"Multiple entries matched, please click to resolve.",
               "FieldName":"Author",
               "FieldValue":"[{'Key':'[email protected]'}]",
               "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|[email protected]",
               "HasException":false
            },
            {
               "ErrorMessage":"Multiple entries matched, please click to resolve.",
               "FieldName":"Editor",
               "FieldValue":"[{'Key':'[email protected]'}]",
               "HasException":true
            },
            {
               "ErrorMessage":null,
               "FieldName":"Modified",
               "FieldValue":"09/15/2022 04:27 PM",
               "HasException":false
            }
         ]
      }
   }
}
1
  • You need to use LoginName instead of email for Author and Editor field. Try using in this format "FieldValue":"[{'Key':'i:0e.t|original-issuer|[email protected]'}]" OR "FieldValue":"[{'Key':'i:0#.f|membership|[email protected]'}]" for Author and Editor fields. Let me know if this works for you. Commented Sep 22, 2022 at 5:04

1 Answer 1

0

The field value should be in this form:

"FieldValue": "[{'Key':'i:0#.w|[email protected]'}]"

Please see Update file metadata with Rest API using ValidateUpdateListItem in SharePoint on-premises for more information.

1
  • Switching to windows claims won't work for me :(
    – user996502
    Commented Sep 23, 2022 at 22:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.