Skip to content

[BUG] - UseWebLogin dosen't work if your SSO account is a guest on in the tenant you're trying to access #3163

@Tanddant

Description

@Tanddant

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

image

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:

  1. Create a random site collection
  2. Invite your windows connected account as a guest to this site
  3. Turn off external sharing on the root site collection
  4. Try and run the following command
    Connect-PnPOnline "https://NonPrimaryTenant.sharepoint.com/sites/SiteThatYourGuestAccountIsInvitedTo/" -UseWebLogin
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions