API issue with new user added to a room

Description

Server Setup Information

  • Version of Rocket.Chat Server: 7.10.0
  • Operating System: Ubuntu 24.04.3 LTS
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v22.16.0
  • MongoDB Version: 6.0.13 / wiredTiger (oplog Enabled)
  • Proxy:
  • Firewalls involved: No

Any additional Information

Hi All,

and sorry for my English.

Very basic usage of Rocketchat.

Many time ago I created this Room with 6 Users

image

Every morning a simple powershell execute API call to create a daily channel for the team and set the Autojoin.

All worked fine until we added the seventh users in the Room. The below request continue to return the original 6 users and totally missed the newone.

$getteaminfo =@{‘teamName’ = ‘OURTEAM’}

$getteaminfo_resultb = Invoke-RestMethod -Uri http://<serverip>:3000/api/v1/teams.members -Method GET -Body $getteaminfo -ContentType “application/json” -Headers $headers

Result: @{members=System.Object[]; total=6; count=6; offset=0; success=True}

The new user need every morning to join maually the daily channel.

Can someone help me to understand what i’m doing wrong?

Thanks in advance.

Best regards.

Massimo

You should either be on the latest 7.10.10 LTS which has a number of security fixes, or 8.4.x

You should also be on at least Mongo 7.x

Upgrade now.

Hi reetp,

just updated following Migrate from Bitnami MongoDB to the official MongoDB Image but unfortunately seems that nothing changed in our API request.

Trying to update again to 8.4.1 we found an issue with orphans docker that, in case, i need to post in a separate thread to avoid crossed argument.

Thanks.

Regards.

Massimo

Check the perms are right per the docs.

List all members of a team. Permission required: view-all-teams

I’d disable then enable again just to be sure.

Also read all the Teams docs to make sure nothing has changed.

You don’t mention your licence version or number of users, but be aware that IIRC some Team functions are limited if you are on CE.

Next thing is to check your logs.

That will probably tell you. You might need to set it to debug level.

Hi reetp,

just to be sure, you talking about the permission of the user that run the API request? Because he is user and we never change its permission.

About the version, hope this help:

Thanks.

Regards.

Massimo

Hi All,

some ideas?

Thanks.

Regards.

Massimo

OK I am trying to understand exactly what you are doing here so I can try and test it on a server.

Many time ago I created this Room with 6 Users

OK.

Create a daily channel for the team and set the Autojoin.

But you already have a channel above? Why create a new one?


I think you may be confusing Teams and Channels/Groups somehow, and possibly a ‘bug’ has allowed you to do something you probably shouldn’t and has now been closed. It won’t be the first time this has happened!

These are the two methods I know of.

With no teams:

Create a Private Room or Public Channel and add then add users.

You can script to create the Room/.Channel and ad all your users

Or:

Create a room/channel, create a Team, add users to the Team, add Rooms or Channels that you want them to join, and and set autojoin.

They should be automatically joined to that room/channel.

You should only need to add a user to the Team for them to join any channels.


Please explain exactly what you are trying to do, and show me how you do it all so I can try and replicate it.