Commands › SharePoint Online

Set-SPOContainerTypeConfiguration

SharePoint Online Microsoft.Online.SharePoint.PowerShell Set-*

Sets or updates the configuration settings of a container type in SharePoint Embedded.

Quick start script

# Set-SPOContainerTypeConfiguration — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-SPOService -Url https://$org-admin.sharepoint.com

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-SPOContainerTypeConfiguration
$before | Format-List

# 3. Make the change (dry run first)
Set-SPOContainerTypeConfiguration -ContainerTypeId <Guid> -WhatIf
Set-SPOContainerTypeConfiguration -ContainerTypeId <Guid>

# 4. Verify and diff
$after = Get-SPOContainerTypeConfiguration
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-SPOContainerTypeConfiguration -ContainerTypeId <Guid> [-DiscoverabilityDisabled <Boolean>]
 [-SharingRestricted <Boolean>] [-ApplicationRedirectUrl <String>] [-WhoCanShareAnonymousAllowList <Guid[]>]
 [-WhoCanShareAuthenticatedGuestAllowList <Guid[]>] [-OverrideTenantWhoCanShareAnonymousAllowList <Boolean>]
 [-OverrideTenantWhoCanShareAuthenticatedGuestAllowList <Boolean>]
 [-CopilotEmbeddedChatHosts <System.Collections.Generic.List`1[System.String]>]
 [-AnonymousLinkExpirationInDays <Int32>] [-IsArchiveEnabled <Boolean>] [-UseLegacyItemWebUrl <Boolean>]  [-WhatIf] [-Confirm] [<CommonParameters>]

Parameters (14)

ParameterTypeRequiredWhat it controls
-AnonymousLinkExpirationInDays Int32 Specifies all anonymous links created after the value is set will expire after the set number of days.
-ApplicationRedirectUrl String This parameter specifies the url of that the application should be redirected to.
-ContainerTypeId Guid yes This parameter specifies the ID of the container type corresponding to the SharePoint Embedded application.
-CopilotEmbeddedChatHosts String] This parameter is used to add host URLs allowed to use the SharePoint Embedded application's declarative agent experience.
-DiscoverabilityDisabled Boolean As a SharePoint Administrator in Microsoft 365, you can control how your content appears in the Microsoft 365 experience. When this value is true, the SharePoint Embedded application content is hidden throughout the...
-UseLegacyItemWebUrl Boolean When enabled, temporarily uses the legacy item WebUrl format instead of the new SharePoint Embedded item WebUrl.
-IsArchiveEnabled Boolean Use the `-IsArchiveEnabled` flag to enable archival of containers. Archival moves data to the cold tier, reducing storage costs. While archived, content is inaccessible until reactivated. Reactivation is immediate...
-OverrideTenantWhoCanShareAnonymousAllowList Boolean This setting determines if the container type `WhoCanShareAnonymousAllowList` overrides the tenant-level `WhoCanShareAnonymousAllowList`.
-OverrideTenantWhoCanShareAuthenticatedGuestAllowList Boolean This setting determines if the container type `WhoCanShareAuthenticatedGuestAllowList` overrides the tenant-level `WhoCanShareAuthenticatedGuestAllowList`.
-SharingRestricted Boolean SharePoint Embedded offers a role-based sharing model that allows developers to configure file-sharing permissions based on container permission roles, offering a choice between a restrictive and an open sharing...
-WhoCanShareAnonymousAllowList Guid[] Sets a container type-specific list of security groups who are allowed to share with anonymous (non-authenticated) users as well as authenticated guest users. This must be set in conjunction with...
-WhoCanShareAuthenticatedGuestAllowList Guid[] Sets a container type-specific list of security groups who are allowed to share with authenticated guest users at the container level. This must be set in conjunction with...
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.

Message Center changes mentioning this command

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.