Cli-microsoft365: New command: aad o365groups recyclebinitem list

Created on 27 Dec 2020  路  13Comments  路  Source: pnp/cli-microsoft365

aad o365group recyclebinitem list

Lists Groups from the recycle bin

| Option | Description |
| ----------------------- | ----------------------------------------- |
| -d, --displayName [displayName] | Lists groups with displayName starting with the specified value |
| -m, --mailNickname [mailNickname] | Lists groups with mailNickname starting with the specified value |
| --query [query] | JMESPath query string |

All deleted Groups are returned if no filters are specified.

Related issues: #1982 #2031

good first issue help wanted new feature work in progress

Most helpful comment

Hi @douglasromao,
you are welcome. You can support us here. Let us finish the specs and you can get started.

@waldekmastykarz: I think the default behavior is to return all items from the recycle bin. But if you want to filter by some criteria, you should be able to do this.

Had enough cases to search for a deleted Group based on the display name or mail nickname in the past couple of years.

br,
Patrick

All 13 comments

Is there a reason why we expect user's to provide a matching value rather than always display all deleted groups?

I would like to try it out (it is my first time contributing to this project) 馃榾

Hi @douglasromao,
you are welcome. You can support us here. Let us finish the specs and you can get started.

@waldekmastykarz: I think the default behavior is to return all items from the recycle bin. But if you want to filter by some criteria, you should be able to do this.

Had enough cases to search for a deleted Group based on the display name or mail nickname in the past couple of years.

br,
Patrick

Understood @plamber. Let's make it clear that filters are optional and if not specified, the command will return all deleted O365 groups.

@douglasromao woohooo! Awesome! Please, don't hesitate to reach out if you have any questions

@douglasromao thank you for your help. All yours :)

Nice @plamber ! I will start and I will ping you guys in case I have some trouble or something like that! thanks!

@plamber @waldekmastykarz , it is the first time that I see the JMESPath structure, do you guys have a place where this is already implemented so I can check?

Hi @douglasromao,
you do not have to bother about it since it is already integrated in the CLI core.

br,
Patrick

@plamber oh, nice! so should I consider just the displayName and mailNickName as command options?

You have four modes considering that displayname and mailnickname are optional values.

  • No options at all: return all items
  • DisplayName: filter by displayname
  • Mailnickname: filter by mailnickname
  • DisplayName + Mailnickname: filter by displayname and mailnickname

Perfect @plamber, I'm finishing up tests and docs so I can create the PR.

@waldekmastykarz @plamber I think I'm failing on merging this using the right path :( sorry about that.
I've created a branch from my fork, merged it through a PR into my master branch.

Should I create a PR here now?

Hi @douglasromao,
that is not required. Ensure that your branch is up to date and then create a PR here.

Here the steps that you should follow before creating the PR here

Was this page helpful?
0 / 5 - 0 ratings

Related issues

plamber picture plamber  路  3Comments

plamber picture plamber  路  3Comments

waldekmastykarz picture waldekmastykarz  路  3Comments

vineet2907 picture vineet2907  路  3Comments

garrytrinder picture garrytrinder  路  3Comments