Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2015-07-06 23:26:49

mdyason
Member
Registered: 2015-01-20
Posts: 43

Can I pre-create an ldap user

All our users are LDAP users.  Some of these people will be using an in-house uploader before ever logging into the system.  Our initial scenario is to have a admin login with API key, do the upload and when done change the owner to our user.  However, we can not change this to a user who does not already exist in the system.  We tried creating the user via API and then the API lets us make that user the owner, but that user can then not log in.  Is there any way to actually create the user without issuing a password to the system but then have the password be taken from the LDAP later on?  We do not want to ask all users to log into the system before uploading photos.  We were hoping to simply use the API to create them on the fly.  We do know their username but we do not know their password.

I hope this question makes sense

Offline

#2 2015-07-07 08:58:03

dominic
Third Light Staff
Registered: 2013-06-06
Posts: 96

Re: Can I pre-create an ldap user

You can create a user, and then subsequently change their authentication type to LDAP, via a call to Users.SetAuthMode.
When the user is initially created a set password e-mail would normally be sent, but it can be suppressed by passing welcomeEmail: false in the call to Users.CreateUser.
When the user logs in for the first time using their LDAP credentials, if an account already exists for their username, set to LDAP auth, and without a bound principal (i.e. in the state it would be after SetAuthMode), it will be used.

Dominic

Offline

Board footer