0

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 ?

  • Your title does not say it all and it does not seem to match the description. Do you use CSOM or REST APIs? Are you trying to create a people picker field for a form in your MVC application? Do you need help with building the UI component or with the APIs for retrieving user profiles from SharePoint? – Mihail-Florin Popa Aug 11 '18 at 11:42
  • Wow it seems i was pretty damn tired. My apologies for not being precise enough. I added more info to the main question. The problem is retrieving user profiles. – Dante R. Aug 11 '18 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.