User JS Object `groups` array not populated for several users

@Lhc_fl, so what you did is get the current user’s username (I suppose with the same AJAX as I use?), then another AJAX to that user JSON, and from there the group?

I like as well @angus’ approach - my code though is on the discourse side… I could just use the same API key and authenticate with that?
I had presumed, that since I use withCredentials… the code runs only when a user is authenticated, and that the data would always be the same.

I am not sure why the data is not the same, is this a security concern to communicate what group a user is in? It’s not that we communicate the actual group data, or other users in that group, as far I see.

In any case, venturing into the suggested approaches now…

Thanks!