Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

401 error... #2666

Closed
sheykh-sleky opened this issue May 10, 2020 · 5 comments
Closed

401 error... #2666

sheykh-sleky opened this issue May 10, 2020 · 5 comments

Comments

@sheykh-sleky
Copy link

###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###

  1. **Using: connect-pnponline
  2. **The cmdlet itself I believe
  3. **Doubtful...

Reporting an Issue or Missing Feature

Reporting an issue: trying to connect to any client tenant site I'm getting 401 from any machine at any location.

Expected behavior

Welcome connection notification...

Actual behavior

Please describe what you see instead. Please provide samples of HTML output or screenshots

Steps to reproduce behavior

connect-pnponline -url $siteUrl

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

  • [ X] PnP PowerShell for SharePoint Online

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

PS C:\ArrowConsultants\Scripts\W-B> Get-Module -Name pnppowershell -ListAvailable

Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name ExportedCommands


Binary 3.20.20... SharePointPnPPowerShellOnline {Add-PnPAlert, Add-PnPApp, Add-PnPApplicationCustomizer, A...
Binary 3.18.20... SharePointPnPPowerShellOnline {Add-PnPAlert, Add-PnPApp, Add-PnPApplicationCustomizer, A...

How did you install the PnP-PowerShell Cmdlets?

  • [x ] Installed through the PowerShell Gallery with Install-Module
@ghost
Copy link

ghost commented May 10, 2020

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label May 10, 2020
@KoenZomers
Copy link
Collaborator

This doesn't give us a lot to work with. You're connecting using credentials to SPO. Are you sure the account you're trying to authenticate with does not have MFA enabled? Also not clear on which PnP PowerShell version you're using. Please ensure you're using the latest one as there was an issue with using special characters in your password which could be causing this which has been fixed only in the latest April 2020 release (pnp/PnP-Sites-Core#2589)

@sheykh-sleky
Copy link
Author

Good morning! WOW! I hadn't even realized the copy/paste didn't put that information in there correctly. Way to ensure the data is there. Indeed, talk about not doing my part! lol

So yes. I am connecting to SPO to apply a template, but failing on the connection part. 'connect-pnponline -url https://mysite.sharepoint.com/sites/testsite' MFA isn't enabled (on this client at least). I am able to open a new incognito window and login manually to the site; but when using the same creds I am still getting the 401 error.

Below is my current version as of writing. But looking at that, perhaps a wonky install? I am going to remove and reinstall latest and greatest.

I sincerely appreciate the response, as I'm wholly confused why this all of a sudden broke for me. I'll respond with my results.

PS C:\ArrowConsultants\Scripts> Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending

Name Version


SharePointPnPPowerShellOnline 3.20.2004.0
SharePointPnPPowerShellOnline 3.18.2002.0

@sheykh-sleky
Copy link
Author

Ok - still a no go. This is really frustrating. Going to see if I can spin up a Google VM to get a wholly different network and validate, its either something on my end (machine or network) or if this is really broken.

Struggling here...

PS C:\ArrowConsultants\Scripts> Get-Module SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending

Name Version


SharePointPnPPowerShellOnline 3.20.2004.0

@sheykh-sleky
Copy link
Author

Hmmm. Yea. User error. Periods... Who knew? ;D

Closing (or please close)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants