pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
985 stars 665 forks source link

[BUG] When using the tools provided by Initialize-PnPPowerShellAuthentication, one can connect to any SiteUrl without error? #2991

Open mvanders opened 3 years ago

mvanders commented 3 years ago

Reporting an Issue or Missing Feature

I used the tools provided by Initialize-PnPPowerShellAuthentication to generate a certificate and connect to my TenantUrl... all fine. Initialize-PnPPowerShellAuthentication -ApplicationName "PoshPsa" -Tenant "upcbe47795.onmicrosoft.com" -OutPath C:\GitHub\ACEA\PowerShell\Certificates\ -CertificatePassword (ConvertTo-SecureString -String "password" -AsplainText -Force) But, when I tried to connect using a Url for a site that DOESN'T exist, it also connect and doesn't give any error although the site is non existing???

Expected behavior

image But... that SiteUrl DOESN'T exist, so I would expect an error! Proof? If I go to https://upcbe47795.sharepoint.com/sites/123, I get

Sorry, something went wrong
404: Not Found
TECHNICAL DETAILS
GO BACK TO SITE

Actual behavior

image But... that SiteUrl DOESN'T exist, and it simply says: Connected to https://upcbe47795.sharepoint.com/sites/123???

Steps to reproduce behavior

I can try with any other Url and get the same image

Which version of the PnP-PowerShell Cmdlets are you using?

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

(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable) image

How did you install the PnP-PowerShell Cmdlets?