Enhancement: Retrieve default list in site
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?
I say 'why not' 😉. Lets do that 👍
May I work on this!
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!
May I work on this? This would be my first code contribution to this project!
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 Sure thing, I'll change it! 👍
As far as I noticed, you guys did introduce a new parameter --default, right? Thanks for clarifying.
@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!