Пример #1
0
 public void RemoveMember(Group group, User user)
 {
     GraphClient.Group.RemoveMember(group.ObjectId, user.ObjectId);
 }
Пример #2
0
 public void AddMember(Group group, User user)
 {
     string memberUrl = string.Format("{0}{1}/directoryObjects/{2}",
         GraphClient.BaseUri.AbsoluteUri, GraphClient.TenantID, user.ObjectId);
     GraphClient.Group.AddMember(group.ObjectId, new GroupAddMemberParameters(memberUrl));
 }
Пример #3
0
 //return all groups the user is a member of (transitive)
 public IList<string> GetMemberGroups(User user)
 {
     return GraphClient.User.GetMemberGroups(new UserGetMemberGroupsParameters(user.ObjectId, false)).ObjectIds;
 }
 private void DeleteAdUser(ResourcesController controllerAdmin, User user)
 {
     if (user != null)
     {
         controllerAdmin.GraphClient.User.Delete(user.ObjectId);
     }
 }