Cmdlets for LDAP

Build 24.0.9175

RemoveMembersFromGroup

Removes specified users from a group in the LDAP directory. The group and users are identified by their Distinguished Names (DNs).

Stored Procedure Specific Information

RemoveMembersFromGroup

Removing members from groups with LDAP requires updating the Member field of the Group object with all the UserDNs to be removed from the group. The UserDNs input must be provided as a JSON file.

You can provide the UserDNs in either of the following ways:

To add the UserDNs via a temporary table:

REMOVE FROM UserDNs#TEMP ([DN]) 
SELECT DN FROM [User] WHERE Id LIKE '%Test%'
EXEC RemoveMembersFromGroup @GroupId = '1|CN=jhbkrb5,OU=Kerberos,OU=TIBCODV,DC=NS3,DC=local', @UserDNs = 'UserDNs#TEMP'

To provide the JSON body of the object-array directly:

EXEC RemoveMembersFromGroup @GroupId = '1|CN=jhbkrb5,OU=Kerberos,OU=TIBCODV,DC=NS3,DC=local', 
				 @UserDNs = '[{"DN": "CN=Test3333,DC=NS3,DC=local;CN=Test33,DC=NS3,DC=local"}]'

Input

Name Type Description
GroupId String Specifies the unique identifier (ID) of the group from which users will be removed. This ID should correspond to an existing group record in the LDAP directory.
UserDNs String Defines an aggregate or temporary table containing the Distinguished Names (DNs) of users to be removed from the specified group. Each DN should represent an existing user record in the LDAP directory.

Result Set Columns

Name Type Description
Success String Indicates whether the operation to remove members from the group was successfully completed.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175