Well my title pretty much says it all. I'm working on a SP Addin on MVC that creates items into a list, but im stuck at getting the user list so people know how to add into People fields.
I know you need to create a User in .cs and add the user by its ID, but my problem here is...how would i get that ID ?
I'm googled quite a bit these last few days, but all answers were from years ago and were not working.
EDIT: Ok so the app is built in C# (MVC) as a SP Provider Hosted Addin for Sharepoint Online. Its basically a form that creates items into a sharepoint list (for now). What i am trying to achieve here is a way to search for users id (to append to the people field) without having users go through extra steps (such as signing in to ms graph to retrieve info or stuff like that).
I did not find any way to get people id's(through csom or anything else) without having the user sign in to MS graph or something similar. I do have a workaround to get users from SharePoint, but it only works if the user i am searching for is in a sharepoint group on that site collection (therefore it does NOT work with "Everyone except external users" or with security groups).
Did anyone find a workaround for this ?