public async Task <ActionResult <Group> > GetGroupById([FromBody] UsersGroup ug) { int id = ug.GroupId; var group = await _groupService.ADGetGroupById(id); if (group == null) { return(NotFound()); } int userId = ug.UserId; group.isJoined = await _groupService.IsGroupMemberAD(id, userId); return(group); }