I am trying to improve the performance so rather than making a separate call to AD through java LDAP SDK is there any way where I can just build one request where I can create the user, assign the attributes, add the members into security groups and distribution groups. and just fire one call and get it done. So can we do it using ldap SDK if yes can you guide me?
Asked
Active
Viewed 134 times
1 Answers
1
I think this is a limitation within Microsoft Active Directory. You can not add a user that does not exist to a group.
Some LDAP server implementations will allow this to take place by assuming the other entries will be created.
You could create separate functions which includes all of the items desired. As an example:
- Create user
- Set Password
- Add Attributes
- Add User to group
There is an example (done in JNDI) at: [https://github.com/jwilleke/Examples-JNDI/blob/master/src/com/willeke/samples/ldap/jndi/ADConnection.java]
Where something similar is performed.
-jim

jwilleke
- 10,467
- 1
- 30
- 51
-
Thanks Jim. can you elaborate the option of "create a function" what type of function do I need to create? – NDD May 04 '22 at 20:18
-
Updated answer to show example. – jwilleke May 05 '22 at 10:46