owners
Creates, updates, deletes, gets or lists an owners resource.
Overview
| Name | owners |
| Type | Resource |
| Id | entra_id.groups.owners |
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 | group_id | ConsistencyLevel | Retrieve a list of the group's owners. The owners are a set of users or service principals who are allowed to modify the group object. Owners are currently not available in Microsoft Graph for groups that were created in Exchange, distribution groups, or groups that are synchronized from an on-premises environment. |
add_ref | insert | group_id | Add a user or service principal to a Microsoft 365 or security group's owners. The owners are a set of users or service principals who are allowed to modify the group object. | |
remove_ref | delete | group_id, directory_object_id | If-Match | Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. |
remove_ref_2 | delete | group_id | If-Match | Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed. |
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 |
group_id | string | The unique identifier of group |
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 the group's owners. The owners are a set of users or service principals who are allowed to modify the group object. Owners are currently not available in Microsoft Graph for groups that were created in Exchange, distribution groups, or groups that are synchronized from an on-premises environment.
SELECT
id,
deletedDateTime
FROM entra_id.groups.owners
WHERE group_id = '{{ group_id }}' -- required
AND ConsistencyLevel = '{{ ConsistencyLevel }}'
;
INSERT examples
- add_ref
- Manifest
Add a user or service principal to a Microsoft 365 or security group's owners. The owners are a set of users or service principals who are allowed to modify the group object.
INSERT INTO entra_id.groups.owners (
directoryObjectId,
group_id
)
SELECT
'{{ directoryObjectId }}',
'{{ group_id }}'
;
# Description fields are for documentation purposes
- name: owners
props:
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the owners 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 owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed.
DELETE FROM entra_id.groups.owners
WHERE group_id = '{{ group_id }}' --required
AND directory_object_id = '{{ directory_object_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Remove an owner from a Microsoft 365 group or a security group through the owners navigation property. Once owners are assigned to a group, the last owner (a user object) of the group cannot be removed.
DELETE FROM entra_id.groups.owners
AND group_id = '{{ group_id }}' --required
AND If-Match = '{{ If-Match }}'
;