Share via


Set-MgExternalConnectionItem

Create a new externalItem object.

Note

To view the beta release of this cmdlet, view Set-MgBetaExternalConnectionItem

Syntax

SetExpanded (Default)

Set-MgExternalConnectionItem
    -ExternalConnectionId <string>
    -ExternalItemId <string>
    [-ResponseHeadersVariable <string>]
    [-Acl <IMicrosoftGraphExternalConnectorsAcl[]>]
    [-Activities <IMicrosoftGraphExternalConnectorsExternalActivity[]>]
    [-AdditionalProperties <hashtable>]
    [-Content <IMicrosoftGraphExternalConnectorsExternalItemContent>]
    [-Id <string>]
    [-Properties <hashtable>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Set

Set-MgExternalConnectionItem
    -ExternalConnectionId <string>
    -ExternalItemId <string>
    -BodyParameter <IMicrosoftGraphExternalConnectorsExternalItem>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetViaIdentityExpanded

Set-MgExternalConnectionItem
    -InputObject <ISearchIdentity>
    [-ResponseHeadersVariable <string>]
    [-Acl <IMicrosoftGraphExternalConnectorsAcl[]>]
    [-Activities <IMicrosoftGraphExternalConnectorsExternalActivity[]>]
    [-AdditionalProperties <hashtable>]
    [-Content <IMicrosoftGraphExternalConnectorsExternalItemContent>]
    [-Id <string>]
    [-Properties <hashtable>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetViaIdentity

Set-MgExternalConnectionItem
    -InputObject <ISearchIdentity>
    -BodyParameter <IMicrosoftGraphExternalConnectorsExternalItem>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Create a new externalItem object.

Permissions

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

Examples

Example: Create a custom item


Import-Module Microsoft.Graph.Search

$params = @{
	acl = @(
		@{
			type = "user"
			value = "e811976d-83df-4cbd-8b9b-5215b18aa874"
			accessType = "grant"
		}
		@{
			type = "externalGroup"
			value = "14m1b9c38qe647f6a"
			accessType = "deny"
		}
	)
	properties = @{
		title = "Error in the payment gateway"
		priority =
		assignee = "john@contoso.com"
	}
	content = @{
		value = "Error in payment gateway..."
		type = "text"
	}
}

Set-MgExternalConnectionItem -ExternalConnectionId $externalConnectionId -ExternalItemId $externalItemId -BodyParameter $params

This example will create a custom item

Parameters

-Acl

An array of access control entries. Each entry specifies the access granted to a user or group. Required. To construct, see NOTES section for ACL properties and create a hash table.

Parameter properties

Type:

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExternalConnectorsAcl[]

Supports wildcards:False
DontShow:False

Parameter sets

SetViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Activities

Returns a list of activities performed on the item. Write-only. To construct, see NOTES section for ACTIVITIES properties and create a hash table.

Parameter properties

Type:

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExternalConnectorsExternalActivity[]

Supports wildcards:False
DontShow:False

Parameter sets

SetViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetExpanded
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

SetViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BodyParameter

externalItem To construct, see NOTES section for BODYPARAMETER properties and create a hash table.

Parameter properties

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

Parameter sets

SetViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
Set
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

-Content

externalItemContent To construct, see NOTES section for CONTENT properties and create a hash table.

Parameter properties

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

Parameter sets

SetViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExternalConnectionId

The unique identifier of externalConnection

Parameter properties

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

Parameter sets

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

-ExternalItemId

The unique identifier of externalItem

Parameter properties

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

Parameter sets

SetExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Set
Position:Named
Mandatory:True
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

SetViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

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

Parameter sets

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

-Properties

properties

Parameter properties

Type:System.Collections.Hashtable
Supports wildcards:False
DontShow:False

Parameter sets

SetViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetExpanded
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

-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

-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.IMicrosoftGraphExternalConnectorsExternalItem

{{ Fill in the Description }}

Microsoft.Graph.PowerShell.Models.ISearchIdentity

{{ Fill in the Description }}

System.Collections.IDictionary

{{ Fill in the Description }}

Outputs

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExternalConnectorsExternalItem

{{ 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.

ACL <IMicrosoftGraphExternalConnectorsAcl[]>: An array of access control entries. Each entry specifies the access granted to a user or group. Required. [AccessType <String>]: accessType [Type <String>]: aclType [Value <String>]: The unique identifer of the identity. For Microsoft Entra identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. For external groups value is set to the ID of the externalGroup

ACTIVITIES <IMicrosoftGraphExternalConnectorsExternalActivity[]>: Returns a list of activities performed on the item. Write-only. [Id <String>]: The unique identifier for an entity. Read-only. [PerformedBy <IMicrosoftGraphExternalConnectorsIdentity>]: identity [(Any) <Object>]: This indicates any property can be added to this object. [Id <String>]: The unique identifier for an entity. Read-only. [Type <String>]: identityType [StartDateTime <DateTime?>]: The date and time when the particular activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. [Type <String>]: externalActivityType

BODYPARAMETER <IMicrosoftGraphExternalConnectorsExternalItem>: externalItem [(Any) <Object>]: This indicates any property can be added to this object. [Id <String>]: The unique identifier for an entity. Read-only. [Acl <IMicrosoftGraphExternalConnectorsAcl[]>]: An array of access control entries. Each entry specifies the access granted to a user or group. Required. [AccessType <String>]: accessType [Type <String>]: aclType [Value <String>]: The unique identifer of the identity. For Microsoft Entra identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. For external groups value is set to the ID of the externalGroup [Activities <IMicrosoftGraphExternalConnectorsExternalActivity[]>]: Returns a list of activities performed on the item. Write-only. [Id <String>]: The unique identifier for an entity. Read-only. [PerformedBy <IMicrosoftGraphExternalConnectorsIdentity>]: identity [(Any) <Object>]: This indicates any property can be added to this object. [Id <String>]: The unique identifier for an entity. Read-only. [Type <String>]: identityType [StartDateTime <DateTime?>]: The date and time when the particular activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. [Type <String>]: externalActivityType [Content <IMicrosoftGraphExternalConnectorsExternalItemContent>]: externalItemContent [(Any) <Object>]: This indicates any property can be added to this object. [Type <String>]: externalItemContentType [Value <String>]: The content for the externalItem. Required. [Properties <IMicrosoftGraphExternalConnectorsProperties>]: properties [(Any) <Object>]: This indicates any property can be added to this object.

CONTENT <IMicrosoftGraphExternalConnectorsExternalItemContent>: externalItemContent [(Any) <Object>]: This indicates any property can be added to this object. [Type <String>]: externalItemContentType [Value <String>]: The content for the externalItem. Required.

INPUTOBJECT <ISearchIdentity>: Identity Parameter [AcronymId <String>]: The unique identifier of acronym [BookmarkId <String>]: The unique identifier of bookmark [ConnectionOperationId <String>]: The unique identifier of connectionOperation [ExternalActivityId <String>]: The unique identifier of externalActivity [ExternalConnectionId <String>]: The unique identifier of externalConnection [ExternalGroupId <String>]: The unique identifier of externalGroup [ExternalItemId <String>]: The unique identifier of externalItem [IdentityId <String>]: The unique identifier of identity [QnaId <String>]: The unique identifier of qna