Replies: 1 comment
-
Should be fixed in #1982 Created as an issue for better tracking: #1983 Will close this Q&A |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The latest major version (1.10.0) allows to get a tenant site with a connection referencing specific site URL.
$url = "https://tenant.sharepoint.com/teams/mysite"
$siteConnection = Connect-PnPOnline -Url $url -Credentials $creds -ReturnConnection
$tenantSite = Get-PnPTenantSite -Identity $url -Connection $siteConnection
However, with latest build (tested with 1.10.47-nightly) you are forced to pass connection object referencing SharePoint admin URL (https://tenant-admin.sharepoint.com) instead, otherwise you get following error:
"Get-PnPTenantSite : The current connection holds no SharePoint context. Please use one of the Connect-PnPOnline commands which uses the -Url argument to connect."
When not using connection object as parameter with Get-PnPTenantSite, but creating general session with Connect-PnPOnline referencing same site URL, it still works as expected. This is not consistent!
Any chance that it will be fixed? What is your opinion on this behavior? Is there a technical reason for this breaking change?
Beta Was this translation helpful? Give feedback.
All reactions