Search code examples
gitlabgitlab-api

LDAP to gitlab user sync for oauth token


I am working with gitlab rest API, and gitlab is connected to LDAP too.

Now I am facing an issue is that if I add a user to LDAP store, this user need to do at least one sign in via web UI to get access token through API (/oauth/token)

My requirement is any users whose are added directly to LDAP need to generate access token through gitlab API without doing any sign in via web UI, please let me know the possible solution.

Thank you


Solution

  • Good morning Jamsheer,

    That makes sense, since otherwise you would automatically create accounts for all the users in your LDAP, with the possibility of running out of licenses.

    Currently there is an open issue where this is being discussed, with the possibility of creating all the LDAP users as deactivated and active them after the first login.

    In any case, this is not in place yet.