# Can't find the user when adding into channel

**URL:** <https://forum.mattermost.com/t/cant-find-the-user-when-adding-into-channel/11927>\
**Category:** Troubleshooting\
**Created:** [July 20, 2021, 12:11am UTC](https://forum.mattermost.com/t/cant-find-the-user-when-adding-into-channel/11927 "2021-07-20T00:11:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmuser2021](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@mmuser2021](https://forum.mattermost.com/u/mmuser2021)\
**Post date:** [July 20, 2021, 12:11am UTC](https://forum.mattermost.com/t/cant-find-the-user-when-adding-into-channel/11927/1 "2021-07-20T00:11:37Z")

</div>

I modified “MaxUsersPerTeam” to a higher value so that more than 50 users can be added.

However, I can’t search the newly added user when adding him into channel.

Any clue? Thanks.

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [July 20, 2021, 1:50pm UTC](https://forum.mattermost.com/t/cant-find-the-user-when-adding-into-channel/11927/2 "2021-07-20T13:50:43Z")

</div>

Was the user already added to the team?

---

<div class="post-metadata">

**Author:** ![mmuser2021](https://avatars.discourse-cdn.com/v4/letter/m/3be4f8/32.png) [@mmuser2021](https://forum.mattermost.com/u/mmuser2021)\
**Post date:** [July 20, 2021, 2:09pm UTC](https://forum.mattermost.com/t/cant-find-the-user-when-adding-into-channel/11927/3 "2021-07-20T14:09:10Z")

</div>

yes, user is added but user is not visible when adding him to channel

---

<div class="post-metadata">

**Author:** ![ahmaddanial](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/ahmaddanial/32/2938_2.png) [@ahmaddanial](https://forum.mattermost.com/u/ahmaddanial)\
**Post date:** [July 21, 2021, 12:59am UTC](https://forum.mattermost.com/t/cant-find-the-user-when-adding-into-channel/11927/4 "2021-07-21T00:59:16Z")

</div>

Hi, @mmuser2021

Got it. Can you please run the following SQL query to check the status of team and channels of the affected user?

```auto
SELECT DISTINCT u.Username, t.DisplayName AS TeamName, c.DisplayName AS ChannelName, cm.SchemeUser AS User, cm.SchemeAdmin AS Admin FROM ChannelMembers AS cm JOIN Channels AS c ON (cm.ChannelId=c.Id) JOIN Users AS u ON (cm.UserId=u.Id) JOIN Teams AS t ON (c.TeamId=t.Id) WHERE u.Username = "<username>";

```

Please replace the `<username>` parameter with the username of the affected user.

- Does this also happen constantly for new users that we were added to the channel after the `MaxUsersPerTeam` was increased or does it also happen for older users too? Does it happen for every private channel?

- Do you use [synchronized groups](https://docs.mattermost.com/onboard/ad-ldap-groups-synchronization.html) to sync specific members into private channels?
