Yes that is the endpoint you would use to get groups for a user. Due to security reasons this endpoint does require an authenticated session to retrieve this information. If you require more information or need guidance of this flow, let us know what you are trying to build and we would do our best to help you out.
Hi Pratik, for verification purposes, we would need a report listing all groups for each users... I know there are already some solution where you can see all users in a group but I would need the other way round (see all groups for a user). Also, I would need to see it for all users. Not one at a time.