Skip to main content

owners

Creates, updates, deletes, gets or lists an owners resource.

Overview

Nameowners
TypeResource
Identra_id.groups.owners

Fields

The following fields are returned by SELECT queries:

Retrieved collection

NameDatatypeDescription
idstringThe unique identifier for an entity. Read-only.
deletedDateTimestring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectgroup_idConsistencyLevelRetrieve 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_refinsertgroup_idAdd 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_refdeletegroup_id, directory_object_idIf-MatchRemove 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_2deletegroup_idIf-MatchRemove 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.

NameDatatypeDescription
directory_object_idstringThe unique identifier of directoryObject
group_idstringThe unique identifier of group
ConsistencyLevelstringIndicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries
If-MatchstringETag

SELECT examples

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 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 }}'
;

DELETE examples

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 }}'
;