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

Connect-PnPOnline -UseWebLogin -Url / wrong account is used - cannot connect #1523

Closed
Whodathinkit opened this issue Apr 19, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@Whodathinkit
Copy link

commented Apr 19, 2018

###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. Are you using Apply-SPOProvisioningTemplate or Get-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting
Previously I was using CSOM and Connect-PnPOnline in various scripts. After MFA was applied - I had a few issues connecting, including excepting my account from IP restriction policies.

Eventually I got "Connect-PnPOnline -UseWebLogin" working until I rebooted my PC and ever since then I can't get Powershell ISE to connect with the right account. I work on various tenancies with different accounts.

Edge is my default browser, but I've tried various things in both IE and Edge including deleting cookies.

Expected behavior

Please describe what output you expect to see from PnP-PowerShell Cmdlets
Connect to SharePoint Online with a web login page (I'm sure this did it before the reboot).

Actual behavior

Please describe what you see instead. Please provide samples of HTML output or screenshots
A login-result form "External sharing is disabled " with the wrong account specified later in the message. The login is a bit weird, consisting of "User: WrongLogin_WrongDomain#EXT#@RightDomain"

Steps to reproduce behavior

Please include complete code samples in-line or linked from gists
Login to the required site in Edge and Internet explorer (optional, tried with and without)
"Connect-PnPOnline -UseWebLogin -URL " - specifying a URL (neither admin nor a normal one seem to work)
Get an error screen back:-
"That didn't work
External sharing is disabled "

With wrong account (PC login) mentioned rather giving me a login form. User: WrongLogin_WrongDomain#EXT#@RightDomain

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

  • PnP PowerShell for SharePoint 2013
  • PnP PowerShell for SharePoint 2016
  • [*] PnP PowerShell for SharePoint Online

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

(you can retrieve this by executing Get-Module -Name *pnppowershell* -ListAvailable)
2.25.1804.1
2.22.1801.0

How did you install the PnP-PowerShell Cmdlets?

  • MSI Installed downloaded from GitHub
  • Installed through the PowerShell Gallery with Install-Module
  • [*] Other means

I can't remember how I installed it - but ran a powershell update-module yesterday

@Whodathinkit

This comment has been minimized.

Copy link
Author

commented Apr 23, 2018

Eventually I got it working. Combination of a number of things

  1. My main account seemed to time out and require re-verification (I didn't tick any boxes for remembering me).

  2. Cleared anything cached (again)

  3. Disabled protected mode in IE

  4. Possibly some edge changes too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.