Skip to main content

Organization Units

Organization units represent nodes in a hierarchical organization tree. Use getOrganizationUnitChildren to traverse the tree and build organization-switcher UIs or access control features.

getOrganizationUnitChildren(config)

Retrieve the direct child organization units of a given organization unit.

import { getOrganizationUnitChildren } from '@thunderid/javascript'

const result = await getOrganizationUnitChildren({
baseUrl: 'https://localhost:8090',
organizationUnitId: '<ou-id>',
limit: 20,
offset: 0,
headers: {
Authorization: `Bearer ${accessToken}`,
},
})

result.organizationUnits.forEach(ou => {
console.log(ou.name, ou.handle)
})

Parameters

ParameterTypeRequiredDescription
config.urlstringFull endpoint URL. Mutually exclusive with baseUrl
config.baseUrlstringThunderID base URL
config.organizationUnitIdstringUUID of the parent organization unit
config.limitnumberMaximum number of children to return
config.offsetnumberZero-based offset for pagination
config.headersRecord<string, string>Additional request headers

Response: OrganizationUnitListResponse

PropertyTypeDescription
organizationUnitsOrganizationUnit[]Child organization units
countnumberNumber of results in this page
startIndexnumberIndex of the first result (1-based)
totalResultsnumberTotal number of children

Types

OrganizationUnit

PropertyTypeDescription
idstringOrganization unit UUID
namestringDisplay name
handlestringURL-safe identifier
descriptionstringOptional description
logoUrlstringOptional logo URL
parentobjectParent organization unit reference
ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© WSO2 LLC. All rights reserved.Privacy PolicyCookie Policy