I need to ensure the user from list people picker column using csom.
Scenario: we have one user in AD and i have added one list item in 2017. The user was being added to the site at that time and user id created was 150.
Now I am retrieving the list item using csom, using below code.
userDetails = context.Web.GetUserById(150);
But this line throwing the exception that 150 user is not found.
when i checked the person from the site users, she is getting different id (33254).
How this was came i am unable to understand. There might be many list items facing the same issue.
I can not update users of each item.
can I check/ensure if user id is changed in the site, then get the user from updated id using csom??
Thanks for any help.