How to save a person or group in a SharePoint?

How to save a person or group in a SharePoint?

This means the user should already be in the site collection, so if the user doesn’t exist the request will fail. Use the below code to get Current User ID to save user under People and group column. People column name is Requestor.

When to use REST API to get user ID?

Normally, in a list where we have Person/Group column (say Employee), when we use REST API to get this column value, we get User ID instead of actual value what we see in list column. Reason being Person/Group column is actually a lookup field internally.

How to get user details from person or Group Field?

This article helps to understand, how to get user details like FirstName, LastName, Email Address etc. for a Person/Group field using REST API. Normally, in a list where we have Person/Group column (say Employee), when we use REST API to get this column value, we get User ID instead of actual value what we see in list column.

How to save a person or Group Field?

I was able to perform the update by simply passing in the ID of the user to the Id field: This means the user should already be in the site collection, so if the user doesn’t exist the request will fail. Use the below code to get Current User ID to save user under People and group column.

How to set SharePoint person field to current user?

In my SharePoint item I have fields for Approved (Date/Time) and ApprovedBy (Person or Group). So when I save my form, I’d like these fields to be populated with the current time and current user. PowerApps basically provides three avenues for updating a record: SubmitForm (), Update (), and Patch ()

Is there way to save user information in SharePoint?

The thing is that User information is a lookup field thereby MyPersonField does not exist on your SharePoint list if you use an OData endpoint, I really don’t know how to save data but same problem happened to me when I tried to read a user.