pnp / cli-microsoft365

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

New command: m365 pp pipeline list #6287

Open appieschot opened 2 months ago

appieschot commented 2 months ago

Usage

m365 pp pipeline list

Description

List all pipelines in the specified Power Platform environment.

Options

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

Examples

List all pipeline models in the given Power Platform environment.

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

List pipeline models in the given environment as admin.

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

Default properties

Additional Info

You can have a look at the logic behind: https://learn.microsoft.com/en-us/power-platform/developer/cli/reference/pipeline and/or https://learn.microsoft.com/en-us/power-platform/developer/pipelines/table-reference

DevPio commented 1 month ago

I would like to take on this task. Could you please assign it to me? Thank you!

milanholemans commented 1 month ago

Sure thank you @DevPio!

DevPio commented 1 month ago

Is it acceptable for the response to return only the user ID in the Owner property? When retrieving pipelines, the response currently returns just the user’s ID instead of detailed information like fullname or firstname. Additionally, in the PR, it’s suggested to return the following data:

Name DeploymentPipelineId Owner statuscode

image

However, expanding the Owner field consistently throws this error:

"Could not find a property named 'fullname' on type 'Microsoft.Dynamics.CRM.principal'"

image

To fetch the user's details, it seems a separate request would be needed for each user, which may not be efficient in terms of performance. Is it acceptable to continue returning only the user ID, or should additional user details be included in the response?

milanholemans commented 1 month ago

@appieschot, do you know a way to make it work? If not, then we just keep the response as-is.

DevPio commented 1 month ago

@appieschot can we proceed with the standard API response?

appieschot commented 1 month ago

Yeah we can proceed with standard API repsonse! Let's get that one in first 🦾. Great job so far!