pnp / cli-microsoft365

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

New command: m365 pp website list #6256

Open appieschot opened 2 months ago

appieschot commented 2 months ago

Usage

m365 pp website list

Description

List all Power Pages websites in the specified Power Platform environment.

Options

Option Description
-e, --environmentName <environmentName> The name of the environment where the Power Pages websites are located.
--asAdmin Run the command as admin and retrieve Power Pages websites for environments you do not have explicitly assigned permissions to.

Examples

List all Power Pages websites in the given Power Platform environment.

m365 pp website list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 

List Power Pages websites models in the given environment as admin.

m365 pp website list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin

Default properties

Checkout: https://learn.microsoft.com/en-us/rest/api/power-platform/powerpages/websites/get-websites#websitedto

Additional Info

You can have a look at the logic behind: https://learn.microsoft.com/en-us/power-platform/developer/cli/reference/pages#pac-pages-list

See our m365 pp card list command on how to implement the as admin, and how to retrieve all items from a given endpoint: https://github.com/pnp/cli-microsoft365/blob/main/src/m365/pp/commands/card/card-list.ts

In this case the API call would be ${dynamicsApiUrl}/api/data/v9.2/mspp_websites

milanholemans commented 2 months ago

One remark: let's rename environment to -e, --environmentName <environmentName> to be in line with other pp commands.

appieschot commented 2 months ago

Done

ktskumar commented 1 month ago

May I work on this!

Adam-it commented 1 month ago

May I work on this!

All yours

Adam-it commented 1 month ago

hi @ktskumar, This issue will take part in the Hacktoberfest event which will take part during October. You may read more about this event here: https://github.com/pnp/cli-microsoft365/discussions/6383

If you want to participate and make this PR count towards this event please be sure to open the PR in October (no sooner and no later 😉)

Jwaegebaert commented 1 month ago

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!

ktskumar commented 2 weeks ago

May I take this up now!

milanholemans commented 2 weeks ago

Hi @ktskumar, I suggest you first finish one of the issues assigned to you (#6269 and #6336).

ktskumar commented 1 week ago

Hi, let me take this now..