-
Notifications
You must be signed in to change notification settings - Fork 386
Description
Reporting an Issue or Missing Feature
I know we're not supposed to use the -UseWebLogin but in some scenarios it's the only option, currently working with a client who's conditional access prevents me from using -Interactive when not on their network.
Using -UseWebLogin worked fine for a while, now however since my primary (windows) account has become a guest, it continues to try and use that, but my guest account does not have access to the root site collection, so I end up stuck on this screen
Essentially stating that external sharing has been turned off for https://.sharepoint.com/_layouts/15/settings.aspx.
Expected behavior
I would've hoped to have an option to run the loginprompt in incognito/inprivate so I could somehow avoid using my windows credentials.
Actual behavior
I end up being stuck on a "That didn't work" error message due to -UseWebLogin attempting to access the root site collection, and no option to "switch account"
Steps to reproduce behavior
On a tenant that's not the same as your windows accounts tenant:
- Create a random site collection
- Invite your windows connected account as a guest to this site
- Turn off external sharing on the root site collection
- Try and run the following command
Connect-PnPOnline "https://NonPrimaryTenant.sharepoint.com/sites/SiteThatYourGuestAccountIsInvitedTo/" -UseWebLogin
- Seemingly that's all it takes
What is the version of the Cmdlet module you are running?
PnP.PowerShell 2.1.1
Which operating system/environment are you running PnP PowerShell on?
- Windows
- Linux
- MacOS
- Azure Cloud Shell
- Azure Functions
- Other : please specify