Beispiel #1
0
 private IList <PrincipalInfo> GetUserPrincipals(string input, int limit)
 {
     using (ClientContext context = new Authentication.LowTrustTokenHelper(_tokenHelper).GetUserClientContext())
     {
         var users = Utility.SearchPrincipals(context, context.Web, input, PrincipalType.User, PrincipalSource.UserInfoList, context.Web.SiteUsers, limit);
         context.ExecuteQuery();
         return(users);
     }
 }
Beispiel #2
0
 private UserCollection GetSiteUsers()
 {
     using (ClientContext context = new Authentication.LowTrustTokenHelper(_tokenHelper).GetUserClientContext())
     {
         var users = context.Web.SiteUsers;
         context.Load(users, user => user.Include(u => u.Title, u => u.LoginName, u => u.Email, u => u.UserPrincipalName, u => u.Id));
         context.ExecuteQuery();
         return(users);
     }
 }