public SystemUser GetFullNameForUser(Guid userid)
        {
            

            SystemUser userdetail = new SystemUser();
            EntityCollection collection = FindUsingGuid(EntityName,
                                               TargetFields,
                                               "systemuserid",
                                               userid);
            foreach (Entity user in collection.Entities)
            {               
                userdetail.Fullname = user["fullname"].ToString();
            }
            return userdetail;
        }
 public async Task<SystemUser> GetUserDetails(string username)
 {           
     Connect();
     SystemUser userdetail = new SystemUser();
     EntityCollection collection = Find(EntityName,
                                        TargetFields,
                                        "domainname",
                                        username);
     foreach (Entity user in collection.Entities)
     {
         userdetail.ID = user["systemuserid"].ToString();
         userdetail.Fullname = user["fullname"].ToString();
     }
     return userdetail;
 }