Import LDAP user and create library via Web API?


is it possible to import a LDAP user via Web API from the AD and then create a named default library?


Does nobody has a suggestion?

Why do you need such a feature?

Hi Daniel,

I want to replace the Windows Sync Center with Seafile.
We have set up a self-service portal for our users. The users can decide to redirect they personally folders to the server. When a user activate this function, now I want to import this user to seafile via script and then I want to create a standard named library for using with GPO.

Or do you know another way?


You can use Seafile admin API to create users and default libraries. Is it a solution for you?

Hi Daniel,

I guess unfortunately not. Because we have a LDAP connection to our AD and so I can’t/won’t create an existing LDAP user.

BTW I’ve seen this API solution.

You may check seafile-pro-server-6.1.x/pro/python/seafevents/ldap_syncer/ to see how it import AD users to Seafile, and modify it according to your need.

Hi Daniel,

thanks for your answer. Unfortunately, I can not see how I can use this script for importing a single user from our LDAP. Is there another way you can explain me?

Thanks in advance.


You can turn on the LDAP sync filter. A possible solution is that you add special property to accounts that should be synced to Seafile and you write a Filter in ccnet.conf to select such users from LDAP.