administrative_units
Creates, updates, deletes, gets or lists an administrative_units resource.
Overview
| Name | administrative_units |
| Type | Resource |
| Id | entra_id.directory.administrative_units |
Fields
The following fields are returned by SELECT queries:
- get
- list
Retrieved navigation property
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
deletedDateTime | string (date-time) | Date and time when this object was deleted. Always null when the object hasn't been deleted. (pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$) |
description | string | An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search. |
displayName | string | Display name for the administrative unit. Maximum length is 256 characters. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderby. |
extensions | array | The collection of open extensions defined for this administrative unit. Nullable. |
isMemberManagementRestricted | boolean | true if members of this administrative unit should be treated as sensitive, which requires specific permissions to manage. If not set, the default value is null and the default behavior is false. Use this property to define administrative units with roles that don't inherit from tenant-level administrators, and where the management of individual member objects is limited to administrators scoped to a restricted management administrative unit. This property is immutable and can't be changed later. For more information on how to work with restricted management administrative units, see Restricted management administrative units in Microsoft Entra ID. |
members | array | Users and groups that are members of this administrative unit. Supports $expand. |
membershipRule | string | The dynamic membership rule for the administrative unit. For more information about the rules you can use for dynamic administrative units and dynamic groups, see Manage rules for dynamic membership groups in Microsoft Entra ID. |
membershipRuleProcessingState | string | Controls whether the dynamic membership rule is actively processed. Set to On to activate the dynamic membership rule, or Paused to stop updating membership dynamically. |
membershipType | string | Indicates the membership type for the administrative unit. The possible values are: dynamic, assigned. If not set, the default value is null and the default behavior is assigned. |
scopedRoleMembers | array | Scoped-role members of this administrative unit. |
visibility | string | Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set, the default value is null and the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit. |
Retrieved collection
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for an entity. Read-only. |
deletedDateTime | string (date-time) | Date and time when this object was deleted. Always null when the object hasn't been deleted. (pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$) |
description | string | An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search. |
displayName | string | Display name for the administrative unit. Maximum length is 256 characters. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderby. |
extensions | array | The collection of open extensions defined for this administrative unit. Nullable. |
isMemberManagementRestricted | boolean | true if members of this administrative unit should be treated as sensitive, which requires specific permissions to manage. If not set, the default value is null and the default behavior is false. Use this property to define administrative units with roles that don't inherit from tenant-level administrators, and where the management of individual member objects is limited to administrators scoped to a restricted management administrative unit. This property is immutable and can't be changed later. For more information on how to work with restricted management administrative units, see Restricted management administrative units in Microsoft Entra ID. |
members | array | Users and groups that are members of this administrative unit. Supports $expand. |
membershipRule | string | The dynamic membership rule for the administrative unit. For more information about the rules you can use for dynamic administrative units and dynamic groups, see Manage rules for dynamic membership groups in Microsoft Entra ID. |
membershipRuleProcessingState | string | Controls whether the dynamic membership rule is actively processed. Set to On to activate the dynamic membership rule, or Paused to stop updating membership dynamically. |
membershipType | string | Indicates the membership type for the administrative unit. The possible values are: dynamic, assigned. If not set, the default value is null and the default behavior is assigned. |
scopedRoleMembers | array | Scoped-role members of this administrative unit. |
visibility | string | Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set, the default value is null and the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | administrative_unit_id | Retrieve the properties and relationships of an administrativeUnit object. The administrativeUnit resource supports extensions, which also allows you to use the GET operation to get custom properties and extension data in an administrativeUnit instance. | |
list | select | Retrieve a list of administrativeUnit objects. | ||
insert | insert | Create a new administrativeUnit. | ||
update | update | administrative_unit_id | Update the properties of an administrativeUnit object. | |
delete | delete | administrative_unit_id | If-Match | Delete an administrativeUnit. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
administrative_unit_id | string | The unique identifier of administrativeUnit |
If-Match | string | ETag |
SELECT examples
- get
- list
Retrieve the properties and relationships of an administrativeUnit object. The administrativeUnit resource supports extensions, which also allows you to use the GET operation to get custom properties and extension data in an administrativeUnit instance.
SELECT
id,
deletedDateTime,
description,
displayName,
extensions,
isMemberManagementRestricted,
members,
membershipRule,
membershipRuleProcessingState,
membershipType,
scopedRoleMembers,
visibility
FROM entra_id.directory.administrative_units
WHERE administrative_unit_id = '{{ administrative_unit_id }}' -- required
;
Retrieve a list of administrativeUnit objects.
SELECT
id,
deletedDateTime,
description,
displayName,
extensions,
isMemberManagementRestricted,
members,
membershipRule,
membershipRuleProcessingState,
membershipType,
scopedRoleMembers,
visibility
FROM entra_id.directory.administrative_units
;
INSERT examples
- insert
- Manifest
Create a new administrativeUnit.
INSERT INTO entra_id.directory.administrative_units (
id,
deletedDateTime,
description,
displayName,
isMemberManagementRestricted,
membershipRule,
membershipRuleProcessingState,
membershipType,
visibility,
extensions,
members,
scopedRoleMembers
)
SELECT
'{{ id }}',
'{{ deletedDateTime }}',
'{{ description }}',
'{{ displayName }}',
{{ isMemberManagementRestricted }},
'{{ membershipRule }}',
'{{ membershipRuleProcessingState }}',
'{{ membershipType }}',
'{{ visibility }}',
'{{ extensions }}',
'{{ members }}',
'{{ scopedRoleMembers }}'
RETURNING
id,
deletedDateTime,
description,
displayName,
extensions,
isMemberManagementRestricted,
members,
membershipRule,
membershipRuleProcessingState,
membershipType,
scopedRoleMembers,
visibility
;
# Description fields are for documentation purposes
- name: administrative_units
props:
- name: id
value: "{{ id }}"
description: |
The unique identifier for an entity. Read-only.
- name: deletedDateTime
value: "{{ deletedDateTime }}"
description: |
Date and time when this object was deleted. Always null when the object hasn't been deleted.
- name: description
value: "{{ description }}"
description: |
An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search.
- name: displayName
value: "{{ displayName }}"
description: |
Display name for the administrative unit. Maximum length is 256 characters. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderby.
- name: isMemberManagementRestricted
value: {{ isMemberManagementRestricted }}
description: |
true if members of this administrative unit should be treated as sensitive, which requires specific permissions to manage. If not set, the default value is null and the default behavior is false. Use this property to define administrative units with roles that don't inherit from tenant-level administrators, and where the management of individual member objects is limited to administrators scoped to a restricted management administrative unit. This property is immutable and can't be changed later. For more information on how to work with restricted management administrative units, see Restricted management administrative units in Microsoft Entra ID.
- name: membershipRule
value: "{{ membershipRule }}"
description: |
The dynamic membership rule for the administrative unit. For more information about the rules you can use for dynamic administrative units and dynamic groups, see Manage rules for dynamic membership groups in Microsoft Entra ID.
- name: membershipRuleProcessingState
value: "{{ membershipRuleProcessingState }}"
description: |
Controls whether the dynamic membership rule is actively processed. Set to On to activate the dynamic membership rule, or Paused to stop updating membership dynamically.
- name: membershipType
value: "{{ membershipType }}"
description: |
Indicates the membership type for the administrative unit. The possible values are: dynamic, assigned. If not set, the default value is null and the default behavior is assigned.
- name: visibility
value: "{{ visibility }}"
description: |
Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set, the default value is null and the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit.
- name: extensions
description: |
The collection of open extensions defined for this administrative unit. Nullable.
value:
- id: "{{ id }}"
- name: members
description: |
Users and groups that are members of this administrative unit. Supports $expand.
value:
- id: "{{ id }}"
deletedDateTime: "{{ deletedDateTime }}"
- name: scopedRoleMembers
description: |
Scoped-role members of this administrative unit.
value:
- id: "{{ id }}"
administrativeUnitId: "{{ administrativeUnitId }}"
roleId: "{{ roleId }}"
roleMemberInfo:
displayName: "{{ displayName }}"
id: "{{ id }}"
UPDATE examples
- update
Update the properties of an administrativeUnit object.
UPDATE entra_id.directory.administrative_units
SET
id = '{{ id }}',
deletedDateTime = '{{ deletedDateTime }}',
description = '{{ description }}',
displayName = '{{ displayName }}',
isMemberManagementRestricted = {{ isMemberManagementRestricted }},
membershipRule = '{{ membershipRule }}',
membershipRuleProcessingState = '{{ membershipRuleProcessingState }}',
membershipType = '{{ membershipType }}',
visibility = '{{ visibility }}',
extensions = '{{ extensions }}',
members = '{{ members }}',
scopedRoleMembers = '{{ scopedRoleMembers }}'
WHERE
administrative_unit_id = '{{ administrative_unit_id }}' --required
RETURNING
id,
deletedDateTime,
description,
displayName,
extensions,
isMemberManagementRestricted,
members,
membershipRule,
membershipRuleProcessingState,
membershipType,
scopedRoleMembers,
visibility;
DELETE examples
- delete
Delete an administrativeUnit.
DELETE FROM entra_id.directory.administrative_units
WHERE administrative_unit_id = '{{ administrative_unit_id }}' --required
AND If-Match = '{{ If-Match }}'
;