Skip to content
Documentation
Updated 7 minutes to read
Markdown

OU Management with the Nodinite LDAP Web API

Section titled “OU Management with the Nodinite LDAP Web API”

Comprehensive Organizational Unit (OU) management operations for LDAP directories using the Nodinite LDAP Web API. This page covers all 6 OU-specific operations with detailed XML examples.

✅ CRUD Operations: Select, Create, Update, Delete OUs
✅ Reorganization: Rename and Move OUs within directory structure
✅ Hierarchy Management: Create nested OU structures programmatically
✅ Batch Support: Process multiple OUs in single operations
✅ Flexible Queries: Use searchFilter for precise OU targeting

OrganizationalUnit operations are available in the Operations section of the OrganizationalUnit record within the request message. Every operation uses the With record to define search criteria and scope; the LDAP Web API first finds the matching OUs, then runs each operation on them. Because an OU is a container, Delete and MoveTo also affect every object inside it.

flowchart LR Client["fa:fa-code Client"] -->|"Execute request (XML or JSON)"| API["fa:fa-cloud LDAP Web API"] API -->|"With: OU, DC, searchScope, searchFilter"| Dir["fa:fa-address-book LDAP directory"] Dir -->|"Matching OUs"| API API -->|"Operations on each matched OU and its children"| Dir API -->|"SearchResult and OperationResult"| Client

Diagram: the LDAP Web API resolves the With query against the directory, then runs the OU operations on every OU found and returns both results.

Both XML and JSON formats are supported. See the Request Schema for message structure details.


Operation Description Multiple Records
Select Retrieve OU records from LDAP ✅ Yes
Create Create new OU with properties ❌ No
Update Update existing OU properties ✅ Yes
Delete Delete OU and all children ✅ Yes
Rename Rename OU (OU name part) ❌ No
MoveTo Move OUs to different location ✅ Yes

The Select operation retrieves OrganizationalUnit objects from the LDAP catalog using the search criteria provided in the With record.

<ns0:LDAP xmlns:ns0="http://integrationsoftware.se/BizTalk/Adapters/LDAP/Request/1.0">
<Batches guid="67A6C24E-4282-4C87-AAE9-344C871531E9" returnResponseMessageOnExceptions="true">
<Batch guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8D">
<OrganizationalUnit>
<With DC="DC=ibiz,DC=local" searchScope="Subtree" expectedMatchCount="*"
searchFilter="(name=Old*)"/>
<Operations>
<Select/>
</Operations>
</OrganizationalUnit>
</Batch>
</Batches>
</ns0:LDAP>

The Create operation creates a new OrganizationalUnit within the location found using the With record search criteria.

Attribute Required Description
name ✅ Yes The name of the OU to create
allowUpdateIfExists ❌ No Updates the existing OU with the properties collection content if the OU already exists. When false (default), the operation fails if the OU already exists

The name-value pair collection with attributes for the OU object to be set by the operation.

<ns0:LDAP xmlns:ns0="http://integrationsoftware.se/BizTalk/Adapters/LDAP/Request/1.0">
<Batches guid="50CAC759-345A-479A-98AF-95B9FB515C8A" returnResponseMessageOnExceptions="true">
<Batch guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8D">
<OrganizationalUnit>
<With OU="OU=Old hackers" DC="DC=ibiz,DC=local" searchScope="Base"
expectedMatchCount="1"/>
<Operations>
<Create name="3l1t hackers3" allowUpdateIfExists="true">
<Properties>
<Property name="description" value="secret society."/>
</Properties>
</Create>
</Operations>
</OrganizationalUnit>
</Batch>
</Batches>
</ns0:LDAP>

The Update operation modifies existing OU properties for one or multiple OUs returned by the query.

The attributes to be updated are provided in the name-value properties collection.

<ns0:LDAP xmlns:ns0="http://integrationsoftware.se/BizTalk/Adapters/LDAP/Request/1.0">
<Batches guid="50CAC759-345A-479A-98AF-95B9FB515C8A" returnResponseMessageOnExceptions="true">
<Batch guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8D">
<OrganizationalUnit>
<With OU="OU=Old hackers" DC="DC=ibiz,DC=local" searchScope="Base"
expectedMatchCount="1"/>
<Operations>
<Update>
<Properties>
<Property name="description" value="Other secret society."/>
</Properties>
</Update>
</Operations>
</OrganizationalUnit>
</Batch>
</Batches>
</ns0:LDAP>

The Delete operation removes the OU and all its children from the LDAP catalog.

<ns0:LDAP xmlns:ns0="http://integrationsoftware.se/BizTalk/Adapters/LDAP/Request/1.0">
<Batches guid="EC117D12-3B90-42C0-AF52-B1501623A637" returnResponseMessageOnExceptions="true">
<Batch guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8D">
<OrganizationalUnit>
<With OU="OU=happy hackers,OU=Old hackers" DC="DC=ibiz,DC=local" searchScope="Base"
expectedMatchCount="1"/>
<Operations>
<Delete/>
</Operations>
</OrganizationalUnit>
</Batch>
</Batches>
</ns0:LDAP>

The response SearchResult displays the OU found for deletion, and the operation result confirms deletion with details about removed objects.

The Rename operation changes the name of an OU. The target name must not already exist, or the operation fails.

Attribute Required Description
name ✅ Yes The new name for the OU object
<ns0:LDAP xmlns:ns0="http://integrationsoftware.se/BizTalk/Adapters/LDAP/Request/1.0">
<Batches guid="E9DAB4D9-757B-4C2A-9372-93C2F80F3EA0" returnResponseMessageOnExceptions="true">
<Batch guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8D">
<OrganizationalUnit>
<With OU="OU=3l1t hackers,OU=Old hackers" DC="DC=ibiz,DC=local" searchScope="Base"
expectedMatchCount="1"/>
<Operations>
<Rename name="3l1t hackers2"/>
</Operations>
</OrganizationalUnit>
</Batch>
</Batches>
</ns0:LDAP>

The MoveTo operation moves OUs found by the With search criteria to the destination location specified in the operation arguments.

Attribute Required Description
DC ✅ Yes Domain Component for the destination
OU ✅ Yes Organizational Unit path for the destination
CN ❌ No Common Name for the destination (rarely used for OU moves)
<ns0:LDAP xmlns:ns0="http://integrationsoftware.se/BizTalk/Adapters/LDAP/Request/1.0">
<Batches guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8E">
<Batch transactionScopeOption="Required" continueOnError="false"
guid="2B25B9E6-4AF2-4094-9AE7-E1E4C99B6C8D">
<OrganizationalUnit>
<With OU="OU=happy customers,OU=Old hackers" DC="DC=ibiz,DC=local" searchScope="Base"
expectedMatchCount="1"/>
<Operations>
<MoveTo OU="OU=3l1t hackers2,OU=Old hackers" DC="DC=ibiz,DC=local"/>
</Operations>
</OrganizationalUnit>
</Batch>
</Batches>
</ns0:LDAP>

Use MoveTo and Rename operations to reorganize your directory structure without recreating objects or breaking references.

Combine Create with allowUpdateIfExists to build idempotent provisioning scripts that can be safely re-executed.

Use Select with searchFilter to identify OUs matching specific patterns, then Delete to remove obsolete organizational structures.

Create hierarchical OU structures for each tenant or department, then use Select to query tenant-specific information.

Query existing OU structures with Select, document the hierarchy, and use Create to rebuild structures in recovery scenarios.


...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...