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: `flow recyclebinitem list` #6139

Open milanholemans opened 1 month ago

milanholemans commented 1 month ago

Usage

m365 flow recyclebinitem list [options]

Description

Lists all soft-deleted Power Automate flows within an environment

Options

Option Description
-e, --environmentName <environmentName> The name of the environment.

Examples

List all soft-deleted flows within a specific environment

m365 flow recyclebinitem list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5

Default properties

Additional Info

Docs

Remarks

A Power Automate flow is soft-deleted when:


[!WARNING]
This command is based on an API that is currently in preview and is subject to change once the API reaches general availability.


(instead of note, use info admonition)

[!NOTE] To use this command, you must be a Global or Power Platform administrator.


API request

GET https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/scopes/admin/environments/<Environment ID>/v2/flows?api-version=2016-11-01&include=softDeletedFlows

Can't really find a way to filter only the deleted flows. Worst case we have to do an in-memory filtering on properties/state = Deleted.

Adam-it commented 1 month ago

LGTM 👍