Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list public groups of a user in Gitlab?

I want all the public groups of a particular user in gitlab. Is there any API or any other way to achieve it.

https://gitlab.com/api/v4/groups If I use this API without providing any authentication token, it gives me all the public groups in GITLAB. But my requirement is to get all public groups of a particular user (using user_id).

like image 405
aman Avatar asked Feb 04 '26 11:02

aman


1 Answers

There is no direct way to list a user's groups.

The closest way to do this would be to list all groups and then use the memberships API to see if the user is in a particular group.

like image 159
sytech Avatar answered Feb 06 '26 13:02

sytech



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!