This example shows how to use the New-MgTenantRelationshipDelegatedAdminRelationship Cmdlet.
Parameters
-AccessAssignments
The access assignments associated with the delegated admin relationship.
To construct, see NOTES section for ACCESSASSIGNMENTS properties and create a hash table.
The date and time in ISO 8601 format and in UTC time when the relationship became active.
Read-only.
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AdditionalProperties
Additional Parameters
Parameter properties
Type:
System.Collections.Hashtable
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AutoExtendDuration
The duration by which the validity of the relationship is automatically extended, denoted in ISO 8601 format.
Supported values are: P0D, PT0S, P180D.
The default value is PT0S.
PT0S indicates that the relationship expires when the endDateTime is reached and it isn't automatically extended.
Parameter properties
Type:
System.TimeSpan
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BodyParameter
delegatedAdminRelationship
To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
The display name of the relationship used for ease of identification.
Must be unique across all delegated admin relationships of the partner and is set by the partner only when the relationship is in the created status and can't be changed by the customer.
Maximum length is 50 characters.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Duration
The duration of the relationship in ISO 8601 format.
Must be a value between P1D and P2Y inclusive.
This is set by the partner only when the relationship is in the created status and can't be changed by the customer.
Parameter properties
Type:
System.TimeSpan
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EndDateTime
The date and time in ISO 8601 format and in UTC time when the status of relationship changes to either terminated or expired.
Calculated as endDateTime = activatedDateTime + duration.
Read-only.
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Headers
Optional headers that will be added to the request.
Parameter properties
Type:
System.Collections.IDictionary
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HttpPipelineAppend
SendAsync Pipeline Steps to be appended to the front of the pipeline
The date and time in ISO 8601 format and in UTC time when the relationship was last modified.
Read-only.
Parameter properties
Type:
System.DateTime
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Operations
The long running operations associated with the delegated admin relationship.
To construct, see NOTES section for OPERATIONS properties and create a hash table.
Runs the command in a mode that only reports what would happen without performing the actions.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
To create the parameters described below, construct a hash table containing the appropriate properties.
For information on hash tables, run Get-Help about_Hash_Tables.
ACCESSASSIGNMENTS <IMicrosoftGraphDelegatedAdminAccessAssignment[]>: The access assignments associated with the delegated admin relationship.
[Id <String>]: The unique identifier for an entity.
Read-only.
[AccessContainer <IMicrosoftGraphDelegatedAdminAccessContainer>]: delegatedAdminAccessContainer
[(Any) <Object>]: This indicates any property can be added to this object.
[AccessContainerId <String>]: The identifier of the access container (for example, a security group).
For 'securityGroup' access containers, this must be a valid ID of a Microsoft Entra security group in the Microsoft partner's tenant.
[AccessContainerType <String>]: delegatedAdminAccessContainerType
[AccessDetails <IMicrosoftGraphDelegatedAdminAccessDetails>]: delegatedAdminAccessDetails
[(Any) <Object>]: This indicates any property can be added to this object.
[UnifiedRoles <IMicrosoftGraphUnifiedRole[]>]: The directory roles that the Microsoft partner is assigned in the customer tenant.
[RoleDefinitionId <String>]: The unified role definition ID of the directory role.
Refer to unifiedRoleDefinition resource.
[CreatedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the access assignment was created.
Read-only.
[LastModifiedDateTime <DateTime?>]: The date and time in ISO 8601 and in UTC time when this access assignment was last modified.
Read-only.
[Status <String>]: delegatedAdminAccessAssignmentStatus
ACCESSDETAILS <IMicrosoftGraphDelegatedAdminAccessDetails>: delegatedAdminAccessDetails
[(Any) <Object>]: This indicates any property can be added to this object.
[UnifiedRoles <IMicrosoftGraphUnifiedRole[]>]: The directory roles that the Microsoft partner is assigned in the customer tenant.
[RoleDefinitionId <String>]: The unified role definition ID of the directory role.
Refer to unifiedRoleDefinition resource.
BODYPARAMETER <IMicrosoftGraphDelegatedAdminRelationship>: delegatedAdminRelationship
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[AccessAssignments <IMicrosoftGraphDelegatedAdminAccessAssignment[]>]: The access assignments associated with the delegated admin relationship.
[Id <String>]: The unique identifier for an entity.
Read-only.
[AccessContainer <IMicrosoftGraphDelegatedAdminAccessContainer>]: delegatedAdminAccessContainer
[(Any) <Object>]: This indicates any property can be added to this object.
[AccessContainerId <String>]: The identifier of the access container (for example, a security group).
For 'securityGroup' access containers, this must be a valid ID of a Microsoft Entra security group in the Microsoft partner's tenant.
[AccessContainerType <String>]: delegatedAdminAccessContainerType
[AccessDetails <IMicrosoftGraphDelegatedAdminAccessDetails>]: delegatedAdminAccessDetails
[(Any) <Object>]: This indicates any property can be added to this object.
[UnifiedRoles <IMicrosoftGraphUnifiedRole[]>]: The directory roles that the Microsoft partner is assigned in the customer tenant.
[RoleDefinitionId <String>]: The unified role definition ID of the directory role.
Refer to unifiedRoleDefinition resource.
[CreatedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the access assignment was created.
Read-only.
[LastModifiedDateTime <DateTime?>]: The date and time in ISO 8601 and in UTC time when this access assignment was last modified.
Read-only.
[Status <String>]: delegatedAdminAccessAssignmentStatus
[AccessDetails <IMicrosoftGraphDelegatedAdminAccessDetails>]: delegatedAdminAccessDetails
[ActivatedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the relationship became active.
Read-only.
[AutoExtendDuration <TimeSpan?>]: The duration by which the validity of the relationship is automatically extended, denoted in ISO 8601 format.
Supported values are: P0D, PT0S, P180D.
The default value is PT0S.
PT0S indicates that the relationship expires when the endDateTime is reached and it isn't automatically extended.
[CreatedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the relationship was created.
Read-only.
[Customer <IMicrosoftGraphDelegatedAdminRelationshipCustomerParticipant>]: delegatedAdminRelationshipCustomerParticipant
[(Any) <Object>]: This indicates any property can be added to this object.
[DisplayName <String>]: The display name of the customer tenant as set by Microsoft Entra ID.
Read-only
[TenantId <String>]: The Microsoft Entra ID-assigned tenant ID of the customer tenant.
[DisplayName <String>]: The display name of the relationship used for ease of identification.
Must be unique across all delegated admin relationships of the partner and is set by the partner only when the relationship is in the created status and can't be changed by the customer.
Maximum length is 50 characters.
[Duration <TimeSpan?>]: The duration of the relationship in ISO 8601 format.
Must be a value between P1D and P2Y inclusive.
This is set by the partner only when the relationship is in the created status and can't be changed by the customer.
[EndDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the status of relationship changes to either terminated or expired.
Calculated as endDateTime = activatedDateTime + duration.
Read-only.
[LastModifiedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the relationship was last modified.
Read-only.
[Operations <IMicrosoftGraphDelegatedAdminRelationshipOperation[]>]: The long running operations associated with the delegated admin relationship.
[Id <String>]: The unique identifier for an entity.
Read-only.
[CreatedDateTime <DateTime?>]: The time in ISO 8601 format and in UTC time when the long-running operation was created.
Read-only.
[Data <String>]: The data (payload) for the operation.
Read-only.
[LastModifiedDateTime <DateTime?>]: The time in ISO 8601 format and in UTC time when the long-running operation was last modified.
Read-only.
[OperationType <String>]: delegatedAdminRelationshipOperationType
[Status <String>]: longRunningOperationStatus
[Requests <IMicrosoftGraphDelegatedAdminRelationshipRequest[]>]: The requests associated with the delegated admin relationship.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Action <String>]: delegatedAdminRelationshipRequestAction
[CreatedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the relationship request was created.
Read-only.
[LastModifiedDateTime <DateTime?>]: The date and time in ISO 8601 format and UTC time when this relationship request was last modified.
Read-only.
[Status <String>]: delegatedAdminRelationshipRequestStatus
[Status <String>]: delegatedAdminRelationshipStatus
CUSTOMER <IMicrosoftGraphDelegatedAdminRelationshipCustomerParticipant>: delegatedAdminRelationshipCustomerParticipant
[(Any) <Object>]: This indicates any property can be added to this object.
[DisplayName <String>]: The display name of the customer tenant as set by Microsoft Entra ID.
Read-only
[TenantId <String>]: The Microsoft Entra ID-assigned tenant ID of the customer tenant.
OPERATIONS <IMicrosoftGraphDelegatedAdminRelationshipOperation[]>: The long running operations associated with the delegated admin relationship.
[Id <String>]: The unique identifier for an entity.
Read-only.
[CreatedDateTime <DateTime?>]: The time in ISO 8601 format and in UTC time when the long-running operation was created.
Read-only.
[Data <String>]: The data (payload) for the operation.
Read-only.
[LastModifiedDateTime <DateTime?>]: The time in ISO 8601 format and in UTC time when the long-running operation was last modified.
Read-only.
[OperationType <String>]: delegatedAdminRelationshipOperationType
[Status <String>]: longRunningOperationStatus
REQUESTS <IMicrosoftGraphDelegatedAdminRelationshipRequest[]>: The requests associated with the delegated admin relationship.
[Id <String>]: The unique identifier for an entity.
Read-only.
[Action <String>]: delegatedAdminRelationshipRequestAction
[CreatedDateTime <DateTime?>]: The date and time in ISO 8601 format and in UTC time when the relationship request was created.
Read-only.
[LastModifiedDateTime <DateTime?>]: The date and time in ISO 8601 format and UTC time when this relationship request was last modified.
Read-only.
[Status <String>]: delegatedAdminRelationshipRequestStatus