Skip to main content

contracts

Creates, updates, deletes, gets or lists a contracts resource.

Overview

Namecontracts
TypeResource
Identra_id.contracts.contracts

Fields

The following fields are returned by SELECT queries:

Retrieved entity

NameDatatypeDescription
idstringThe unique identifier for an entity. Read-only.
contractTypestringType of contract. The possible values are: SyndicationPartner, BreadthPartner, ResellerPartner. See more in the table below.
customerIdstring (uuid)The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant's organization resource. (pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)
defaultDomainNamestringA copy of the customer tenant's default domain name. The copy is made when the partnership with the customer is established. It isn't automatically updated if the customer tenant's default domain name changes.
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])$)
displayNamestringA copy of the customer tenant's display name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant's display name changes.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcontract_idRetrieve the properties and relationships of contract object.
listselectRetrieve a list of contract objects associated to a partner tenant.
insertinsert
updateupdatecontract_id
deletedeletecontract_idIf-Match
get_available_extension_propertiesexecReturn all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties:
get_by_idsexecReturn the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0. Some common uses for this function are to:
validate_propertiesexecValidate that a Microsoft 365 group's display name or mail nickname complies with naming policies. Clients can use this API to determine whether a display name or mail nickname is valid before trying to create a Microsoft 365 group. To validate the properties of an existing group, use the group: validateProperties function. The following policy validations are performed for the display name and mail nickname properties:
1. Validate the prefix and suffix naming policy
2. Validate the custom banned words policy
3. Validate that the mail nickname is unique This API only returns the first validation failure that is encountered. If the properties fail multiple validations, only the first validation failure is returned. However, you can validate both the mail nickname and the display name and receive a collection of validation errors if you're only validating the prefix and suffix naming policy. To learn more about configuring naming policies, see Configure naming policy.
check_member_groupsexeccontract_idCheck for membership in a specified list of group IDs, and return from that list the IDs of groups where a specified object is a member. The specified object can be of one of the following types:
- user
- group
- service principal
- organizational contact
- device
- directory object This function is transitive. You can check up to a maximum of 20 groups per request. This function supports all groups provisioned in Microsoft Entra ID. Because Microsoft 365 groups cannot contain other groups, membership in a Microsoft 365 group is always direct.
check_member_objectsexeccontract_id
get_member_groupsexeccontract_idReturn all the group IDs for the groups that the specified user, group, service principal, organizational contact, device, or directory object is a member of. This function is transitive. This API returns up to 11,000 group IDs. If more than 11,000 results are available, it returns a 400 Bad Request error with the DirectoryResultSizeLimitExceeded error code. If you get the DirectoryResultSizeLimitExceeded error code, use the List group transitive memberOf API instead.
get_member_objectsexeccontract_idReturn all IDs for the groups, administrative units, and directory roles that an object of one of the following types is a member of:
- user
- group
- service principal
- organizational contact
- device
- directory object This function is transitive. Only users and role-enabled groups can be members of directory roles.
restoreexeccontract_idRestore a recently deleted directory object from deleted items. The following types are supported:
- administrativeUnit
- application
- agentIdentityBlueprint
- agentIdentity
- agentIdentityBlueprintPrincipal
- agentUser
- certificateBasedAuthPki
- certificateAuthorityDetail
- group
- servicePrincipal
- user If an item is accidentally deleted, you can fully restore the item. Additionally, restoring an application doesn't automatically restore the associated service principal automatically. You must call this API to explicitly restore the deleted service principal. A recently deleted item remains available for up to 30 days. After 30 days, the item is permanently deleted.

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
contract_idstringThe unique identifier of contract
If-MatchstringETag

SELECT examples

Retrieve the properties and relationships of contract object.

SELECT
id,
contractType,
customerId,
defaultDomainName,
deletedDateTime,
displayName
FROM entra_id.contracts.contracts
WHERE contract_id = '{{ contract_id }}' -- required
;

INSERT examples

No description available.

INSERT INTO entra_id.contracts.contracts (
id,
deletedDateTime,
contractType,
customerId,
defaultDomainName,
displayName
)
SELECT
'{{ id }}',
'{{ deletedDateTime }}',
'{{ contractType }}',
'{{ customerId }}',
'{{ defaultDomainName }}',
'{{ displayName }}'
RETURNING
id,
contractType,
customerId,
defaultDomainName,
deletedDateTime,
displayName
;

UPDATE examples

No description available.

UPDATE entra_id.contracts.contracts
SET
id = '{{ id }}',
deletedDateTime = '{{ deletedDateTime }}',
contractType = '{{ contractType }}',
customerId = '{{ customerId }}',
defaultDomainName = '{{ defaultDomainName }}',
displayName = '{{ displayName }}'
WHERE
contract_id = '{{ contract_id }}' --required
RETURNING
id,
contractType,
customerId,
defaultDomainName,
deletedDateTime,
displayName;

DELETE examples

No description available.

DELETE FROM entra_id.contracts.contracts
WHERE contract_id = '{{ contract_id }}' --required
AND If-Match = '{{ If-Match }}'
;

Lifecycle Methods

Return all directory extension definitions that are registered in a directory, including through multitenant apps. The following entities support extension properties:

EXEC entra_id.contracts.contracts.get_available_extension_properties
@@json=
'{
"isSyncedFromOnPremises": {{ isSyncedFromOnPremises }}
}'
;