registered_users
Creates, updates, deletes, gets or lists a registered_users resource.
Overview
| Name | registered_users |
| Type | Resource |
| Id | entra_id.devices.registered_users |
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 | device_id | ConsistencyLevel | Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. |
add_ref | insert | device_id | Add a registered user for the device. | |
remove_ref | delete | device_id, directory_object_id | If-Match | Remove a user as a registered user of the device. |
remove_ref_2 | delete | device_id | If-Match | Remove a user as a registered user of the device. |
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 |
|---|---|---|
device_id | string | The unique identifier of device |
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
Retrieve a list of users that are registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration.
SELECT
id,
deletedDateTime
FROM entra_id.devices.registered_users
WHERE device_id = '{{ device_id }}' -- required
AND ConsistencyLevel = '{{ ConsistencyLevel }}'
;
INSERT examples
- add_ref
- Manifest
Add a registered user for the device.
INSERT INTO entra_id.devices.registered_users (
directoryObjectId,
device_id
)
SELECT
'{{ directoryObjectId }}',
'{{ device_id }}'
;
# Description fields are for documentation purposes
- name: registered_users
props:
- name: device_id
value: "{{ device_id }}"
description: Required parameter for the registered_users 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
Remove a user as a registered user of the device.
DELETE FROM entra_id.devices.registered_users
WHERE device_id = '{{ device_id }}' --required
AND directory_object_id = '{{ directory_object_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Remove a user as a registered user of the device.
DELETE FROM entra_id.devices.registered_users
AND device_id = '{{ device_id }}' --required
AND If-Match = '{{ If-Match }}'
;