Customers
User information
 Loading ...
Show article in Knowledge Base

 LDAP Import job Export knowledge base Export     SubscribeSubscribe      Show article info

The LDAP import job can fetch data from AD/LDAP on a regular basis and import these users into the system.

 

This is a scheduled Quartz job that you need to configure to work. Please configure LDAP authentication first and make sure that this works before configuring the LDAP import job.

 

You can use the following parameters in the job:

 

companyId

The companyId for your company in the database. This should be 1 unless you have changed this manually or moved from the cloud version of VisionProject
username This is the same username as for your normal LDAP Configuration
password This is the same password as for your normal LDAP Configuration
url The server location
baseDN The location where to start importing users
searchFilter

The search filter used to find the users to import. This will be combined with the baseDN.

 

For example:

 

(&(memberOf=CN=visionflow-user-group,OU=Roles,OU=IT-Department,DC=ad,DC=mycompany,DC=se))

 

Use (&(objectClass=*)) if you don't want to filter

objectAttributeMapping What Attributes you want to map into VisionProject

 

 

See below for a sample job configuration section that you need to add into the jobs_installed.xml file to work.

 

 

<job>    
  <
job-detail>

     <name>LDAPUserDataImporter</name>
     <group>LDAPJobs</group>
     <job-class>se.visionera.visionproject.jobscheduler.LDAPUserDataImporterJob</job-class>
     <volatility>false</volatility>
     <durability>false</durability>
     <recover>false</recover>
     <job-data-map>
        <entry>
           <key>companyId</key>
           <value>1</value>
        </entry>
        <entry>
           <key>username</key>
           <value></value>
        </entry>
        <entry>
           <key>password</key>
           <value></value>
        </entry>
        <entry>
           <key>url</key>
           <value></value>
        </entry>
        <entry>
           <key>baseDN</key>
           <value></value>
        </entry>
        <entry>
           <key>searchFilter</key>
           <value></value>
        </entry>
        <entry>
           <key>objectAttributeMapping</key>
           <value>
              name=displayName
              emailAddress=mail
              memberOf=memberOf
              companyName=company
              userName=samaccountname
              jobTitle=title
              phone=telephoneNumber
              forvaltning=description
              avdelning=department
              enhet=division
              sub_companyField=description
              sub_sub_companyField=department
              sub_sub_sub_companyField=division
           </value>
        </entry>
        <entry>
           <key>userGroupId</key>
           <value>6</value>
        </entry>
        <entry>
           <key>projectIds</key>
           <value>1</value>
        </entry>
        <entry>
           <key>userGroupMemberOfMapping</key>
           <value>
              1=roll-visionflow-agents
              6=roll-visionflow-user
           </value>
        </entry>
              <entry>
           <key>memberOfToCIPrefixName</key>
           <value>roll-usrapp-</value>
        </entry>
              <entry>
           <key>memberOfToCIIdToImportInto</key>
           <value>122</value>
        </entry>
     </job-data-map>
  </job-detail>
  <trigger>
     <cron>
        <name>LDAPUserDataTrigger_2</name>
        <group>LDAPJobs</group>
        <job-name>LDAPUserDataImporter_2</job-name>
        <job-group>LDAPDataSyncJob</job-group>
        <cron-expression>0 0/20 * * * ?</cron-expression>
     </cron>
  </trigger>
</job>
<job-detail>
     <name>LDAPUserDataImporter_2</name>
     <group>LDAPJobs</group>
     <job-class>se.visionera.visionproject.jobscheduler.LDAPUserDataImporterJob</job-class>
     <volatility>false</volatility>
     <durability>false</durability>
     <recover>false</recover>
     <job-data-map>
        <entry>
           <key>companyId</key>
           <value>1</value>
        </entry>
        <entry>
           <key>username</key>
           <value>CN=Service Account VisionFlow,OU=Users,OU=MyCompany,DC=ad,DC=Sweden,DC=se</value>
        </entry>
        <entry>
           <key>password</key>
           <value>myPass</value>
        </entry>
        <entry>
           <key>url</key>
           <value>ldap://myServer.se:389</value>
        </entry>
        <entry>
           <key>baseDN</key>
           <value>OU=Users,OU=MyCompany,DC=ad,DC=sweden,DC=se</value>
        </entry>
        <entry>
           <key>searchFilter</key>
           <value>(&(memberOf=CN=role-visionflow-users,OU=Users,OU=MyCompany,DC=ad,DC=Sweden,DC=se))</value>
        </entry>
        <entry>
           <key>objectAttributeMapping</key>
           <value>
              name=displayName
              emailAddress=mail
              memberOf=memberOf
              companyName=company
              userName=samaccountname
              jobTitle=title
              phone=telephoneNumber
              forvaltning=description
              avdelning=department
              enhet=division
              sub_companyField=description
              sub_sub_companyField=department
              sub_sub_sub_companyField=division
           </value>
        </entry>
        <entry>
           <key>userGroupId</key>
           <value>6</value>
        </entry>
        <entry>
           <key>projectIds</key>
           <value>1</value>
        </entry>
        <entry>
           <key>userGroupMemberOfMapping</key>
           <value>
              1=roll-visionflow-agents
              6=roll-visionflow-user
           </value>
        </entry>
              <entry>
           <key>memberOfToCIPrefixName</key>
           <value>roll-usrapp-</value>
        </entry>
              <entry>
           <key>memberOfToCIIdToImportInto</key>
           <value>122</value>
        </entry>
     </job-data-map>
  </job-detail>
  <trigger>
     <cron>
        <name>LDAPUserDataTrigger_2</name>
        <group>LDAPJobs</group>
        <job-name>LDAPUserDataImporter_2</job-name>
        <job-group>LDAPDataSyncJob</job-group>
        <cron-expression>0 0/20 * * * ?</cron-expression>
     </cron>
  </trigger>
</job>

 

Note: We do not recommend import of more than 2000 objects at a time since that slows the system down. If more objects needs to be imported divide them into groups of a maximum of 2000 and then add more groups once the first is imported.

User comments
 Loading ...