Skip to content

[BUG] Set-PnPTenantSite : Improperly formed input allow list: 'google.com manga.com' #2114

@IfEyeOnlyKnew

Description

@IfEyeOnlyKnew

Reporting an Issue or Missing Feature

parameter is not working -SharingAllowedDomainList when using multiple domains separated by a space

Expected behavior

Set-PnPTenantSite : Improperly formed input allow list: 'google.com manga.com'

Actual behavior

Set-PnPTenantSite -Url $url -SharingCapability ExternalUserSharingOnly -SharingAllowedDomainList , works when using just one domain 'google.com'

Steps to reproduce behavior

Set-PnPTenantSite -Url $url -SharingCapability ExternalUserSharingOnly while ((Get-PnPTenantSite -Identity $url -Detailed).SiteDefinedSharingCapability -ne "ExternalUserSharingOnly") #Write-Host "." -NoNewline Sleep -s 10 $SetDomain = Set-PnPTenantSite $Url -SharingDomainRestrictionMode AllowList -SharingAllowedDomainList $extdomain
Set-PnPTenantSite : Improperly formed input allow list: 'google.com manga.com'
At line:1 char:14
• ... SetDomain = Set-PnPTenantSite $Url -SharingDomainRestrictionMode All ...
• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

• CategoryInfo : WriteError: (:) [Set-PnPTenantSite], ServerException
• FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.SetTenantSite
I can add 1 domain with no issues using the same command. In the script above I set the command equal to a variable, but that did not help either. I have tried just using 'google.com manga.com' for the domains. Same error.
Reproduction Steps
$Url ="https://company.sharepoint.com/teams/PnPTest1" $extdomain = "google.com manga.com" $SetDomain = Set-PnPTenantSite $Url -SharingDomainRestrictionMode AllowList -SharingAllowedDomainList $extdomain
Set-PnPTenantSite : Improperly formed input allow list: 'google.com manga.com'
At line:3 char:14
• ... SetDomain = Set-PnPTenantSite $Url -SharingDomainRestrictionMode All ...
• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

• CategoryInfo : WriteError: (:) [Set-PnPTenantSite], ServerException
• FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.SetTenantSite
Set-PnPTenantSite $Url -SharingDomainRestrictionMode AllowList -SharingAllowedDomainList "google.com manga.com"
Set-PnPTenantSite : Improperly formed input allow list: 'google.com manga.com'
At line:1 char:1
• Set-PnPTenantSite $Url -SharingDomainRestrictionMode AllowList -Shar ...
• + CategoryInfo : WriteError: (:) [Set-PnPTenantSite], ServerException
• + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.SetTenantSite

What is the version of the Cmdlet module you are running?

PnP.PowerShell 1.10.18 / Windows PowerShell ISE

Which operating system/environment are you running PnP PowerShell on?

  • Windows Server 2012 R2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions