cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Enhancement: Retrieve default list in site

Open milanholemans opened this issue 1 year ago • 4 comments

Let's expand the command spo list get with the possibility to retrieve the default list in a site. This means that options id, title, and url will no longer be required.

Example

m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x

API request

GET https://contoso.sharepoint.com/sites/project-x/_api/web/DefaultDocumentLibrary

Personally, I would find it useful to expand RootFolder by default. This contains some useful information of the list (like server relative URL). Not everyone has knowledge of which properties are available to expand on a list object. Therefore I think it would make it a bit more user-friendly. Does anyone agree to expand this property by default or should we leave it this way?

milanholemans avatar Feb 16 '24 16:02 milanholemans

I say 'why not' 😉. Lets do that 👍

Adam-it avatar Jul 05 '24 11:07 Adam-it

May I work on this!

ktskumar avatar Sep 24 '24 22:09 ktskumar

Hey @ktskumar, thank you for all the hard work you’ve put in, it’s really appreciated! We’ve noticed that you have several issues assigned that haven't yet been created with a PR. To ensure everyone has a chance to get involved, especially with Hacktoberfest, I’ll be unassigning you from some of these issues.

We recommend focusing on 1 to 2 issues at a time. Once you’ve submitted a PR for an issue, you can easily claim another open one. This approach helps you manage the workload more effectively and ensures you can give each task the attention it needs.

Thanks again for your continued contributions!

Jwaegebaert avatar Sep 26 '24 11:09 Jwaegebaert

May I work on this? This would be my first code contribution to this project!

tmaestrini avatar Oct 20 '24 20:10 tmaestrini

Hi @tmaestrini, as discussed here: https://github.com/pnp/cli-microsoft365/issues/6493, is it possible to change your PR accordingly? We're sorry for the late turnaround.

milanholemans avatar Jan 03 '25 21:01 milanholemans

@milanholemans Sure thing, I'll change it! 👍 As far as I noticed, you guys did introduce a new parameter --default, right? Thanks for clarifying.

tmaestrini avatar Jan 03 '25 22:01 tmaestrini

@milanholemans Sure thing, I'll change it! 👍 As far as I noticed, you guys did introduce a new parameter --default, right? Thanks for clarifying.

Correct, instead of:

m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x

it's now:

m365 spo list get --webUrl https://contoso.sharepoint.com/sites/project-x --default

So the user should specify the list id, title, URL, ... or default.

Thanks for the willingness to update your PR!

milanholemans avatar Jan 03 '25 22:01 milanholemans