I have a condition in which I add people to user information list and then would like to add them to a custom list in my site. Using sharepoint search api I was able to get the Preferred Name and am able to add the person to the user information list,but now that I am not getting an ID, how can I add the person?
Or Is there any chance of getting the user Id from user name? Thanks in advance
We can use REST API to get the list items by user name. The code below for your reference: