pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
901 stars 318 forks source link

New command: m365 spp contentcenter list #6101

Open mkm17 opened 2 months ago

mkm17 commented 2 months ago

Usage

m365 spp contentcenter list

Description

Gets the URLs of the SharePoint Premium content centers

Options

No options required

Examples

Gets the URL of the SharePoint Premium content centers

m365 spp contentcenter list

Default properties

Additional Info

Let's add remarks: To use this command you have to have permissions to access the tenant admin site.

We should return URLs of all sites with the webTemplate CONTENTCTR#0. We can have multiple sites with this template.

Adam-it commented 2 months ago

so just to summarize the idea. You suggest to use the same CSOM call we use in spo site list and just filter by CONTENTCTR#0 template? or do you suggest some different API to support that? Other than that LGTM πŸ‘

mkm17 commented 2 months ago

Hi @Adam, it’s exactly as you said: we can use the same approach as in spo site list.

I had a dilemma about whether spo stx contentcentre add and spo stx contentcentre list should be separate commands, or if it would be better to incorporate these functionalities into spo site list and spo site add.

But I guess it is something similar to the app catalog in SP, and for that type of site, we have separate commands to add and retrieve.

What do you think?

Adam-it commented 2 months ago

Yes I would also have them as separate commands πŸ‘. Ok thanks for clarifying the code intention. In this case it would be best to extract site list logic to a reusable util method so that the logic may be reused in both commands

@pnp/cli-for-microsoft-365-maintainers any other feed?

Jwaegebaert commented 1 month ago

Awesome job @mkm17 with speccing out all these commands. One small detail I already noticed, shouldn't it be contentcenter instead of contentcentre?

mkm17 commented 1 month ago

@Jwaegebaert yes, you are right, I have changed it. Thank you!

Jwaegebaert commented 1 month ago

Nice work! One more additional detail would be to replace all the occurrences of Syntex with SharePoint Premium. But besides that, I've no further remarks and it looks good to go!

mkm17 commented 1 month ago

@Jwaegebaert ok, all proposed changes applied :)

Jwaegebaert commented 1 month ago

Awesome, let's wait a bit regarding the naming for the command and then we can open it up. Do you want to work on this one as well, or open it up?

Adam-it commented 1 month ago

@mkm17 LGTM. lets open it up πŸ‘ would you want to take the lead on this one? also we should mention default properties as we do for all list type commands.

milanholemans commented 1 month ago

One small remark:

To use this command you have to have permissions to access the tenant admin site.

I always found this a very vague remark. let's just say that people need at least the SharePoint Administrator role.

mkm17 commented 1 month ago

@Adam-it ok I can take this also ;)