0

I am struggling with creating a new list item with Person or Group column via HTTP request in Power Automate while using claims of the users. I can't get the syntax to work.

I was able to create workaround updating (not creating) item that works, but with this I need to create empty item before my workaround below.

Any idea how to make it works for create item HTTP Request?

My current HTTP request:

Method: POST
    
Uri: _api/web/lists/getbytitle('LISTTITLE')/items(123)/validateUpdateListItem

Headers: <none>
Body:
{
    "formValues": [{
        "FieldName": "AssignedToMultiSelect",
        "FieldValue": "[{'Key':'user_claims'}]"
    }]
}
2
  • Any reason you are not using "create item" action or only /items endpoint to create a list item instead of /validateUpdateListItem? Oct 4, 2022 at 3:19
  • That's the point I couldn't find the working syntax of HTTP Request with just /items. "Create item" is hard to move between tenants and also I couldn't set alternative name in hyperlink column.
    – Popkornak
    Oct 4, 2022 at 7:15

1 Answer 1

1

To add items use AddValidateUpdateItemUsingPath instead of ValidateUpdateListItem.

You should use the following formats for the FieldValue property for People or Group fields. The Key property value should be 'i:0#.f|membership|' plus the user's email address.

With single select: "FieldValue":"[{'Key':'i:0#.f|membership|[email protected]'}]"

With multiple select: "FieldValue":"[{'Key':'i:0#.f|membership|[email protected]'},{'Key':'i:0#.f|membership|[email protected]'}]"

4
  • that's what I am using now, but I cannot manage to make working HTTP Request to CREATE item, I am missing some headers settings or body syntax idk.
    – Popkornak
    Oct 4, 2022 at 18:22
  • To add an item use AddValidateUpdateItemUsingPath instead of ValidateUpdateListItem. The body format for the request is similar. Here's an example: learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/… Oct 4, 2022 at 18:29
  • its working with /GetByTitle('Test')/AddValidateUpdateItemUsingPath ! Thank you, I don't know why I did not found this documentation earlier! post it in the answer, I will mark it as accepted.
    – Popkornak
    Oct 4, 2022 at 22:14
  • Glad I could help. I updated my answer to include the information from my comment above. Oct 5, 2022 at 12:11

Your Answer

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

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