I am an admin of a new site collection in a SharePoint Online environment, and I can see all the users in user pickers.
However, if i want to get the users in CSOM, i.e:
var users = context.Web.SiteUsers;
(where Web is the site collection), it will return only 5 or 6 users, whereas there are really more than 2000 users.
If I create a new element in any list, and selected/resolved a user in the user picker, he will be added to the SiteUsers => I can get the user in CSOM.
On the other hand, I can get all users from the root site www.{mydomain}.sharepoint.com using CSOM.
Any ideas? is there a special permission/configuration that I have to ask for?
Thanks