Add a way for LDAP users to be created before first login

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Zendesk issue: https://gitlab.zendesk.com/agent/tickets/27167

We often have questions about how users can be assign to groups/projects prior to their first login. Automatically importing/adding all LDAP users to GitLab ahead of time is not ideal because it would potentially use too many licenses. Still, it would be nice to have a way to let administrators pre-populate LDAP users. There's also the issue from the user perspective that seeing no groups/projects after first sign in can be confusing.

  • What if we add an API endpoint where admins can specify usernames of users to pre-create?
  • What about a rake task that allows specifying a list of usernames?
  • EE-only, or would this be useful in CE, too?

cc/ @DouweM @JobV Thoughts?

Proposal

  • Create the users as "deactivated" before first login - this wouldn't take up seats but would still create them, and then on first login they would activate.

  • Allow adding specific username(s) to the API request to fetch it from LDAP to see which ones are already created in GitLab, and create it/them if they don't exist.

Possible Workarounds

  • #699 (comment 55580177)
  • #699 (comment 318574293)
Edited Jun 16, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading