New-MgTenantRelationshipDelegatedAdminRelationship

Create a new delegatedAdminRelationship object.

Note

To view the beta release of this cmdlet, view New-MgBetaTenantRelationshipDelegatedAdminRelationship

Syntax

CreateExpanded (Default)

New-MgTenantRelationshipDelegatedAdminRelationship
    [-ResponseHeadersVariable <string>]
    [-AccessAssignments <IMicrosoftGraphDelegatedAdminAccessAssignment[]>]
    [-AccessDetails <IMicrosoftGraphDelegatedAdminAccessDetails>]
    [-ActivatedDateTime <datetime>]
    [-AdditionalProperties <hashtable>]
    [-AutoExtendDuration <timespan>]
    [-CreatedDateTime <datetime>]
    [-Customer <IMicrosoftGraphDelegatedAdminRelationshipCustomerParticipant>]
    [-DisplayName <string>]
    [-Duration <timespan>]
    [-EndDateTime <datetime>]
    [-Id <string>]
    [-LastModifiedDateTime <datetime>]
    [-Operations <IMicrosoftGraphDelegatedAdminRelationshipOperation[]>]
    [-Requests <IMicrosoftGraphDelegatedAdminRelationshipRequest[]>]
    [-Status <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Create

New-MgTenantRelationshipDelegatedAdminRelationship

    -BodyParameter <IMicrosoftGraphDelegatedAdminRelationship>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Create a new delegatedAdminRelationship object.

Permissions

Permission type Permissions (from least to most privileged)
Delegated (work or school account) DelegatedAdminRelationship.ReadWrite.All,
Delegated (personal Microsoft account) Not supported
Application DelegatedAdminRelationship.ReadWrite.All,

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.Identity.Partner

$params = @{
	displayName = "Contoso admin relationship"
	duration = "P730D"
	customer = @{
		tenantId = "4b827261-d21f-4aa9-b7db-7fa1f56fb163"
		displayName = "Contoso subsidiary Inc"
	}
	accessDetails = @{
		unifiedRoles = @(
			@{
				roleDefinitionId = "29232cdf-9323-42fd-ade2-1d097af3e4de"
			}
			@{
				roleDefinitionId = "3a2c62db-5318-420d-8d74-23affee5d9d5"
			}
		)
	}
	autoExtendDuration = "P180D"
}

New-MgTenantRelationshipDelegatedAdminRelationship -BodyParameter $params

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.

Parameter properties

Type:

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminAccessAssignment[]

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

-AccessDetails

delegatedAdminAccessDetails To construct, see NOTES section for ACCESSDETAILS properties and create a hash table.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminAccessDetails
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

-ActivatedDateTime

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.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminRelationship
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Break

Wait for .NET debugger to attach

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreatedDateTime

The date and time in ISO 8601 format and in UTC time when the relationship was created. 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

-Customer

delegatedAdminRelationshipCustomerParticipant To construct, see NOTES section for CUSTOMER properties and create a hash table.

Parameter properties

Type:Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminRelationshipCustomerParticipant
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

-DisplayName

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

Parameter properties

Type:

Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]

Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpPipelinePrepend

SendAsync Pipeline Steps to be prepended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]

Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

The unique identifier for an entity. Read-only.

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

-LastModifiedDateTime

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.

Parameter properties

Type:

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminRelationshipOperation[]

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

-Proxy

The URI for the proxy server to use

Parameter properties

Type:System.Uri
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyCredential

Credentials for a proxy server to use for the remote call

Parameter properties

Type:System.Management.Automation.PSCredential
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ProxyUseDefaultCredentials

Use the default credentials for the proxy

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Requests

The requests associated with the delegated admin relationship. To construct, see NOTES section for REQUESTS properties and create a hash table.

Parameter properties

Type:

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminRelationshipRequest[]

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

-ResponseHeadersVariable

Optional Response Headers Variable.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False
Aliases:RHV

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Status

delegatedAdminRelationshipStatus

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

-WhatIf

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.

Inputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminRelationship

{{ Fill in the Description }}

System.Collections.IDictionary

{{ Fill in the Description }}

Outputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedAdminRelationship

{{ Fill in the Description }}

Notes

COMPLEX PARAMETER PROPERTIES

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