<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Lazy / On-demand Synchronization of LDAP Users</title><link>https://answers.axonivy.com/questions/3786/lazy-on-demand-synchronization-of-ldap-users</link><description>&lt;p&gt;In our project we are using Microsoft AD as our security system. Our access policy is that anyone working in our company is allowed to access our Ivy application.&lt;/p&gt;
&lt;p&gt;Our problem now is that daily user synchronization and user filtering in our code is quite slow as we have over 50'000 possible users to synchronize, even though our application is only used by a couple of thousand users.&lt;/p&gt;
&lt;p&gt;Is it possible to 'lazy load' users, only adding users to our Ivy system database on first usage / login? And not on first synchronization with our AD system? But still updating users that have been changed in AD during synchronization?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3786/lazy-on-demand-synchronization-of-ldap-users" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 29 Apr 2019 10:00:45 -0400</lastBuildDate><item><title>Answer by Andreas Rusch</title><link>https://answers.axonivy.com/questions/3786/lazy-on-demand-synchronization-of-ldap-users/3787</link><description>&lt;p&gt;This depends on the version you are using. We added support for this use case with LTS version 7.0.12 and LE version 7.4.&lt;/p&gt;
&lt;p&gt;You can change the default behavior by specifying the following properties:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LTS version 7.0.12 and later:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add the additional system property &lt;code&gt;-Dch.ivyteam.ivy.security.internal.jndi.import.ondemand=true&lt;/code&gt; to &lt;code&gt;ivy.vm.additional.options&lt;/code&gt; in your Engine .ilc file. This property defines the default behavior of the engine.&lt;/p&gt;
&lt;p&gt;If you want to override the default behavior for a specific application, you need to add an additional system property &lt;code&gt;-Dch.ivyteam.ivy.security.internal.jndi.import.ondemand.[app_name]=[true | false]&lt;/code&gt; in your .ilc file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LE Version 7.4 and later:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add the following properties to the configuration of your security system (see [engineDir]/configuration/defaults/&lt;a href="https://developer.axonivy.com/doc/dev/engine-guide/configuration/files/ivy-securitysystem-yaml.html"&gt;ivy.securitysystem.yaml&lt;/a&gt;)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Import:
  # Should users be imported on demand or by the synchronizing job.
  # If OnDemand is set to: 
  # true:  then users are not imported by the synchronization job.
  #        Instead, a user is imported the first time she logs in. 
  # false: then users are imported by the user synchronizing job.
  #        If a user was not yet imported by the user synchronization job she is also
  #        imported the first time she logs in.
  OnDemand: true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; While in 7.0.12+ the system property &lt;code&gt;ch.ivyteam.ivy.security.internal.jndi.import.ondemand&lt;/code&gt; defines the default behavior for all security systems on an engine, in 7.4+ the default behavior cannot be changed and is always &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andreas Rusch</dc:creator><pubDate>Mon, 29 Apr 2019 10:00:45 -0400</pubDate><guid>https://answers.axonivy.com/questions/3786/lazy-on-demand-synchronization-of-ldap-users/3787</guid></item></channel></rss>