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

Adding authentication cookies for SPO Admin domain #2687

Merged
merged 1 commit into from
Jun 25, 2020
Merged

Adding authentication cookies for SPO Admin domain #2687

merged 1 commit into from
Jun 25, 2020

Conversation

KoenZomers
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
New sample? no
Related issues? discussed in pnp/PnP-PowerShell#2742

What's in this Pull Request?

In PnP PowerShell, when using Connect-PnPOnline -Url https://tenant.sharepoint.com -WebLogin and then running a PnPAdminCmdlet such as Get-PnPTenant, it would throw a 401 access denied as it doesn't have the FedAuth cookie for the tenant-admin.sharepoint.com domain. With this update, when connecting, it will add the FedAuth cookie for both the tenant.sharepoint.com as well as for the tenant-admin.sharepoint.com domains so the PnPAdminCmdlets will auto elevate and work correctly.

@KoenZomers KoenZomers changed the title Also adding authentication cookies for SPO Admin domain Adding authentication cookies for SPO Admin domain Jun 24, 2020
@jansenbe jansenbe self-assigned this Jun 25, 2020
jansenbe added a commit that referenced this pull request Jun 25, 2020
@jansenbe jansenbe merged commit ff67616 into pnp:dev Jun 25, 2020
@jansenbe
Copy link
Contributor

Thanks @KoenZomers , simple and good fix for a problem that initially seemed more complex!

@KoenZomers
Copy link
Contributor Author

@jansenbe Indeed, not too bad :) Only downside of this solution is that it will not work for dvNext enhanced tenants with vanity domains. Not sure how many of those we still have around anyway. Do you have some insight into this?

@KoenZomers KoenZomers deleted the SetCookieOnSPOAdminDomain branch June 25, 2020 07:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants