Table of Contents

Set-PnPSearchExternalConnection

SYNOPSIS

Required Permissions

  • Microsoft Graph API: ExternalConnection.ReadWrite.OwnedBy or ExternalConnection.ReadWrite.All

Updates a connection to an external datasource for Microsoft Search

SYNTAX

Set-PnPSearchExternalConnection -Identity <SearchExternalConnectionPipeBind> [-Name <String>] [-Description <String>] [-AuthorizedAppIds <String[]>] [-Verbose] [-Connection <PnPConnection>] 

DESCRIPTION

This cmdlet can be used to update an external datasource connection that is being indexed into Microsoft Search through a custom connector. Use New-PnPSearchExternalConnection to create a new connector.

EXAMPLES

EXAMPLE 1

Set-PnPSearchExternalConnection -Identity "pnppowershell" -Name "PnP PowerShell Rocks"

This will update just the name of the external connection with the provided identity to the value provided. The description will remain unchanged.

EXAMPLE 2

Set-PnPSearchExternalConnection -Identity "pnppowershell" -Name "PnP PowerShell Rocks" -Description "External content ingested using PnP PowerShell which rocks"

This will update the name and description of the external connection with the provided identity to the values provided.

EXAMPLE 3

Set-PnPSearchExternalConnection -Identity "pnppowershell" -AuthorizedAppIds "00000000-0000-0000-0000-000000000000","11111111-1111-1111-1111-111111111111"

This will replace the application registration identifiers of which the client Ids have been provided that can add items to the index for this connection.

PARAMETERS

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Identity

Unique identifier or an instance of the external connection in Microsoft Search that needs to be updated.

Type: SearchExternalConnectionPipeBind
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False

-Name

The display name of the connection to be displayed in the Microsoft 365 admin center. Maximum length of 128 characters. Only provide when it needs to change.

Type: String
Parameter Sets: (All)
Required: False
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Description

Description of the connection displayed in the Microsoft 365 admin center. Only provide when it needs to change.

Type: String
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AuthorizedAppIds

The client Ids of the application registrations that are allowed to add items to the index for this connection. Only provide when it needs to change.

Type: String[]
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Verbose

When provided, additional debug statements will be shown while executing the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices