administrative_units_members
Creates, updates, deletes, gets or lists an administrative_units_members resource.
Overview
| Name | administrative_units_members |
| Type | Resource |
| Id | entra_id.directory.administrative_units_members |
Fields
The following fields are returned by SELECT queries:
- list
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])$) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | administrative_unit_id | ConsistencyLevel | Use this API to get the members list (users, groups, or devices) in an administrative unit. |
add_ref | insert | administrative_unit_id | Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit. | |
remove_ref | delete | administrative_unit_id, directory_object_id | If-Match | Use this API to remove a member (user, group, or device) from an administrative unit. |
remove_ref_2 | delete | administrative_unit_id | If-Match | Use this API to remove a member (user, group, or device) from an administrative unit. |
create_members | exec | administrative_unit_id | Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit. |
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 |
directory_object_id | string | The unique identifier of directoryObject |
ConsistencyLevel | string | Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries |
If-Match | string | ETag |
SELECT examples
- list
Use this API to get the members list (users, groups, or devices) in an administrative unit.
SELECT
id,
deletedDateTime
FROM entra_id.directory.administrative_units_members
WHERE administrative_unit_id = '{{ administrative_unit_id }}' -- required
AND ConsistencyLevel = '{{ ConsistencyLevel }}'
;
INSERT examples
- add_ref
- Manifest
Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit.
INSERT INTO entra_id.directory.administrative_units_members (
directoryObjectId,
administrative_unit_id
)
SELECT
'{{ directoryObjectId }}',
'{{ administrative_unit_id }}'
;
# Description fields are for documentation purposes
- name: administrative_units_members
props:
- name: administrative_unit_id
value: "{{ administrative_unit_id }}"
description: Required parameter for the administrative_units_members resource.
- name: directoryObjectId
value: "{{ directoryObjectId }}"
description: |
The id of the directory object to reference (a user, group, service principal, device, ...). Sent on the wire as '@odata.id': 'https://graph.microsoft.com/v1.0/directoryObjects/{id}'.
DELETE examples
- remove_ref
- remove_ref_2
Use this API to remove a member (user, group, or device) from an administrative unit.
DELETE FROM entra_id.directory.administrative_units_members
WHERE administrative_unit_id = '{{ administrative_unit_id }}' --required
AND directory_object_id = '{{ directory_object_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Use this API to remove a member (user, group, or device) from an administrative unit.
DELETE FROM entra_id.directory.administrative_units_members
AND administrative_unit_id = '{{ administrative_unit_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Lifecycle Methods
- create_members
Use this API to add a member (user, group, or device) to an administrative unit. Currently it's only possible to add one member at a time to an administrative unit.
EXEC entra_id.directory.administrative_units_members.create_members
@administrative_unit_id='{{ administrative_unit_id }}' --required
@@json=
'{
"id": "{{ id }}",
"deletedDateTime": "{{ deletedDateTime }}"
}'
;