Skip to main content

owners

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

Overview

Nameowners
TypeResource
Identra_id.applications.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
listselectapplication_idConsistencyLevelRetrieve a list of owners for an application that are directoryObject types.
add_refinsertapplication_idAdd an owner to an application. Application owners can be individual users, the associated service principal, or another service principal.
remove_refdeleteapplication_id, directory_object_idIf-MatchRemove an owner from an application. As a recommended best practice, apps should have at least two owners.
remove_ref_2deleteapplication_idIf-MatchRemove an owner from an application. As a recommended best practice, apps should have at least two owners.

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
application_idstringThe unique identifier of application
directory_object_idstringThe unique identifier of directoryObject
ConsistencyLevelstringIndicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries
If-MatchstringETag

SELECT examples

Retrieve a list of owners for an application that are directoryObject types.

SELECT
id,
deletedDateTime
FROM entra_id.applications.owners
WHERE application_id = '{{ application_id }}' -- required
AND ConsistencyLevel = '{{ ConsistencyLevel }}'
;

INSERT examples

Add an owner to an application. Application owners can be individual users, the associated service principal, or another service principal.

INSERT INTO entra_id.applications.owners (
directoryObjectId,
application_id
)
SELECT
'{{ directoryObjectId }}',
'{{ application_id }}'
;

DELETE examples

Remove an owner from an application. As a recommended best practice, apps should have at least two owners.

DELETE FROM entra_id.applications.owners
WHERE application_id = '{{ application_id }}' --required
AND directory_object_id = '{{ directory_object_id }}' --required
AND If-Match = '{{ If-Match }}'
;