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

[FEATURE] Add site Id to output of Get-PnPTenantSite #36

Closed
alexbelevantsev opened this issue Nov 28, 2020 · 3 comments
Closed

[FEATURE] Add site Id to output of Get-PnPTenantSite #36

alexbelevantsev opened this issue Nov 28, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@alexbelevantsev
Copy link

Is your feature request related to a problem? Please describe.
Get-PnPTenantSite doesn't return site Id.

Describe the solution you'd like
Get-PnPTenantSite returns a site Id.

Describe alternatives you've considered
Currently we use the following cmdlets to get the site Id:

Connect-PnPOnline -Url $tenant_site_url -Credentials $cred
$sites=Get-PnPTenantSite -Detailed
foreach($tenant_site in $sites){
    Connect-PnPOnline -Url $tenant_site.Url -Credentials $cred
    $site = Get-PnPSite -Includes ID
}

Unfortunately additional cmdlets takes much time to execute.

@alexbelevantsev alexbelevantsev added the enhancement New feature or request label Nov 28, 2020
@erwinvanhunen
Copy link
Member

Hi @alexbelevantsev ,

Unfortunately the API we call behind the scenes does not return a site id. The cmdlet returns the objects as returned by that API. If we would include the site id, we basically would have to do the same as you're already doing in your script, which would mean we would have to create our own object to return (minor problem, but still it would add a task to our work where we would have to make sure that our object stays in sync with the one being returned from the APi, and make sure that all properties from the API object are available in our own object), but it will also add a serious performance hit in the cmdlet. Especially with tenants that have thousands of thousands of sites. There is also the challenge that it can be possible that a tenant admin has no access to a specific site collection and retrieving the properties will fail then for that site collection.

I would propose to create an entry in user voice: https://sharepoint.uservoice.com/ so that the engineering team see the request and hopefully will add it to a future version of the APIs we use.

@fthorild
Copy link
Contributor

fthorild commented Oct 9, 2024

Hi!

I ended up in a situation where I needed to map a usage report only having SiteId and I wanted to solve it via pwsh but couldn't.

Instead I solved it with a console app but I do think what I did is pretty much the same thing that happens under the covers here? Or am I wrong, a bit rusty these days with this SPO-dev world?

In this file (src/Commands/Admin/GetTenantSite.cs) it looks like that but the SiteId is missing from the model in this file (src/Commands/Model/SPOSite.cs)

Just wanted to see if this after all is possible to fix and also maybe fairly simple? @erwinvanhunen

site-props

@KoenZomers
Copy link
Collaborator

Fixed through #4527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants