Open bjbakker1984 opened 9 months ago
Could you share some more details about the "bot" site? I haven't seen this before and am curious, what's behind. Thanks!
Hi Andi,
PS C:\Windows\system32> Get-PnPTenantSite
Url Template LocaleId
This breaks the "MSFT_SPOSite.psm1" script because you cannot request non-org baseURL sites in the Get-PnPTenantSite instruction.
PS C:\Windows\system32> Get-PnPTenantSite -Url http://bot189315-002/sites/<
+ CategoryInfo : InvalidOperation: (:) [Get-PnPTenantSite], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,PnP.PowerShell.Commands.GetTenantSite
-------------------
Translated error: The managed path sites/URL is not a managed path in this tenant
Note; This "dummy" site is not visible in the Sharepoint GUI, only in Powershell/Graph.
What would create this bot URL? Is this really functional or does it hold any valuable information?
Description of the issue
MSFT_SPOSite.psm1 fails when a bot or other service with non-tenant URL is in Site list.
Proposed solution (add code in line 936, above "$site = Get-PnPTenantSite -Identity $site.Url" :
Effect: Foreach $site is only executed when $site.url starts with correct baseURL. If not correct, "continue" is called and current line is skipped.
Microsoft 365 DSC Version
1.23.1213.1
Which workloads are affected
SharePoint Online
The DSC configuration
No response
Verbose logs showing the problem
Environment Information + PowerShell Version