Unable to insert data into Sharepoint list that is a People/group type column using graph explorer API

Sumanth Krishna, Kondapalli 6 Reputation points

I am using SharePoint list to store few data records and one of the column type is People/Group , usually when we type a value it searches for the value in AD and once selected it sets that value to that column.

But if i want to achieve the same thing using Graph explorer API and try to insert the same data example a user's full name or employee short id or so and send the values , the API calls shows as successful and when i check the response or the list in SharePoint there is no entry for it and it just shows as blank value.

I have tried looking up the user id value and even used it to send in the API but still the same, so i am looking for any guidance / help on how i can achieve it using the API call without using any language SDK's.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,383 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 5,951 Reputation points

    Hi @Sumanth Krishna, Kondapalli

    You can update single value 'personOrGroup' fields, by combining the field name with Lookup-Id and passing the Lookup-Id as the value.

    This will give you the lookup id. Now you can use this Lookup-Id to set the value. Please refer to the below sample screenshot.



    • Field name is provided in the following format: {field-name}LookupId
    • Field value corresponds to lookup id and provided as a string

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote. If you have further questions about this answer, please click "Comment".

    0 comments No comments