I have an Autohosted SharePoint 2013 App. Therefore I cannot use the Sharepoint built in People Picker controls.
My idea is to display all users which are available in the App/Web to display in a dropdown. I got the dropdown working fine with AjaxControlToolkit and jquery, but I have troubles retrieving the users.
If I use:
SP.UserCollection siteusers = cc.Web.SiteUsers;
cc.Load(siteusers);
cc.ExecuteQuery();
foreach (SP.User member in siteusers)
{
everything works fine if i give my app full permissions. But that is not what I need and also I do not want to use this permission as my app will never get published in the store that way. I tried setting Read permission to Web but then I get an Unauthorized Exception...
Can somebody tell me how to retriev all users from the Web or the App?
best regards Alex