Hi Mohanish,
We discussed some time ago special Cache Refresh script to load users from remote data source. But there are few alternatives of this approach:
1. Insert into Gluu DB all user via SCIM Rest API.
2. Implement Auto Enrollment in Authentication Script.
In second approach on user login you can do:
1. Authenticate user via Impexium Rest API.
2. Add user into DB if in not exists yet. We can add minimum attributes set.
Here are small pattern:
```
externalUid = "Impexium-%s" % impexiumUid
userService = CdiUtil.bean(UserService)
userByUid = userService.getUserByAttribute("oxExternalUid", externalUid)
...
if userByUid == None:
// Add user to DB
newUser = User()
#Fill user attrs
newUser.setAttribute("oxExternalUid", externalUid)
self.fillUser(newUser, profile)
newUser = userService.addUser(newUser, True)
else:
// Update user in DB if needed
```
Here is [sample](https://github.com/GluuFederation/oxAuth/blob/master/Server/integrations/passport/PassportExternalAuthenticator.py#L483).