A tool to retrieve users info from an Active Directory and push them into a Coveo organization.
How it works
The tool goes through these steps:
- query the Active Directory with
ldapsearchfor the groups you want to add to your Coveo organization.
- query the AD for each users in these groups, saving their info as .json files under
- collect all the .json files for the users, and create one
- upload (push) the
batch.jsonto the Coveo organization using the Coveo Push API.
You need to have these softwares installed:
- Node.js and these npm packages:
- ldif - this package reads ldapsearch output and puts it in a json object
- ldapsearch (Mac or Linux, should have it by default)
- cygwin (Windows), use
setup-x86_64.exe. Required for running bash scripts and using ldapsearch. Make sure to include these packages:
Net / libopenldap_2_4_2
Net / openldap
Net / openldap-server
How to build
- Download code from github
- Open a terminal and move to the
npm installto install Node dependencies
- Set up
ldapUser.passwordwith the password of the user you will use to query the Active Directory with ldapsearch.
- It's easier and safer to create a file with the password it.
- Just make sure you edit its file properties so only you can see its content (
chmod 400) or through File properties on Windows.
- Is used by crawlAD.js also
- Edit config in
config.js, set all your keys and LDAP info.
How to run
- Push API Reference https://developers.coveo.com/display/CloudPlatform/Push+API+Reference
- Push API Swagger page https://platform.cloud.coveo.com/docs?api=PushApi
- Jérôme Devost (https://github.com/jdevost)