We have a requirement to verify 100 of users if they have access in GitLab. If they have then in which project and their roles in the project needs to be shared.
How can i export List of licensed GitLab users and their projects with roles? Is there a way to get such information out of GitLab?
Best way is via API I think. But you will have to use a number of API commands to do it.
- Get the user list: Users API | GitLab
- Get the project: Projects API | GitLab
- Get the project’s members and role: Group and project members API | GitLab
The access level is reported as a number, so as per that link:
The access levels are defined in the
Gitlab::Access module. Currently, these levels are recognized:
- No access (
- Minimal access (
5 ) (Introduced in GitLab 13.5.)
- Guest (
- Reporter (
- Developer (
- Maintainer (
- Owner (
50 ) - Only valid to set for groups
+1 This is exactly what I do, I have a script which runs as a weekly
cron job and emails me the list.
Thankyou for the suggestion.