sponsors
Creates, updates, deletes, gets or lists a sponsors resource.
Overview
| Name | sponsors |
| Type | Resource |
| Id | entra_id.users.sponsors |
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 | user_id | Get an agentUser's sponsors. Sponsors are users and groups that are responsible for this agent user's privileges in the tenant and for keeping the agent user's information and access up to date. | |
add_ref | insert | user_id | Assign an agentUser a sponsor. Sponsors are users and groups that are responsible for this agent user's privileges in the tenant and for keeping the agent user's information and access up to date. | |
remove_ref | delete | user_id, directory_object_id | If-Match | Remove an agentUser's sponsor. |
remove_ref_2 | delete | user_id | If-Match | Remove an agentUser's sponsor. |
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 |
|---|---|---|
directory_object_id | string | The unique identifier of directoryObject |
user_id | string | The unique identifier of user |
If-Match | string | ETag |
SELECT examples
- list
Get an agentUser's sponsors. Sponsors are users and groups that are responsible for this agent user's privileges in the tenant and for keeping the agent user's information and access up to date.
SELECT
id,
deletedDateTime
FROM entra_id.users.sponsors
WHERE user_id = '{{ user_id }}' -- required
;
INSERT examples
- add_ref
- Manifest
Assign an agentUser a sponsor. Sponsors are users and groups that are responsible for this agent user's privileges in the tenant and for keeping the agent user's information and access up to date.
INSERT INTO entra_id.users.sponsors (
directoryObjectId,
user_id
)
SELECT
'{{ directoryObjectId }}',
'{{ user_id }}'
;
# Description fields are for documentation purposes
- name: sponsors
props:
- name: user_id
value: "{{ user_id }}"
description: Required parameter for the sponsors 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 an agentUser's sponsor.
DELETE FROM entra_id.users.sponsors
WHERE user_id = '{{ user_id }}' --required
AND directory_object_id = '{{ directory_object_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Remove an agentUser's sponsor.
DELETE FROM entra_id.users.sponsors
AND user_id = '{{ user_id }}' --required
AND If-Match = '{{ If-Match }}'
;