Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNP Module should show an error if the site is not valid #1652

Closed
farismalaeb opened this issue Feb 24, 2022 · 3 comments · Fixed by #1924
Closed

PNP Module should show an error if the site is not valid #1652

farismalaeb opened this issue Feb 24, 2022 · 3 comments · Fixed by #1924
Labels
enhancement New feature or request

Comments

@farismalaeb
Copy link

When connecting to a SharePoint site with a wrong URL, the module is not returning any error and it looks like the connection was success.
Connect-PnPOnline -Url 'https://Mytendnance.sharepoint.com/NotExistSite' -Credentials $Username
there won't be any error that the site does not exist. instead, all the other cmdlets such as Get-PNPList return an error that does not reflect the original issue.

It will be good to for the PNP module to check if the site is actually exist

@farismalaeb farismalaeb added the enhancement New feature or request label Feb 24, 2022
@farismalaeb
Copy link
Author

On PowerShell 7 its seems to be working fine, but 5.1 ISE not.

@KoenZomers
Copy link
Collaborator

Understood @farismalaeb . PR #1924 will add an optional -ValidateConnection to Connect-PnPOnline which will allow you to do this.

@gautamdsheth
Copy link
Collaborator

Thanks for raising the issue.
Closing this as the PR is now merged, please use the latest nightly build available tomorrow where the fix will be available !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants