Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: List administrative units #5569

Closed
MartinM85 opened this issue Oct 16, 2023 · 3 comments
Closed

New command: List administrative units #5569

MartinM85 opened this issue Oct 16, 2023 · 3 comments
Assignees
Labels
feature request hacktoberfest Issue perfect for hacktoberfest
Milestone

Comments

@MartinM85
Copy link
Contributor

MartinM85 commented Oct 16, 2023

Usage

m365 aad administrativeunit list

Description

List all administrative units

Examples

List all administrative units

m365 aad administrativeunit list

Default properties

  • id
  • displayName
  • visibility

Additional Info

The required permissions scope: AdministrativeUnit.Read.All

Link to the doc:

https://learn.microsoft.com/en-us/graph/api/directory-list-administrativeunits?view=graph-rest-1.0&tabs=http

I would try to implement the command.

It should be the first command to manage administrative units.

Next commands will follow:

  • add administrative unit
  • get administrative unit
  • remove administrative unit
  • add member
  • list members
  • remove member
  • assign scoped role administrative unit
  • list assignments
  • remove assignment

Suppose that only one command can be implemented. So, I will create next issue, once it's implemented.

@Jwaegebaert
Copy link
Contributor

Jwaegebaert commented Oct 16, 2023

Nice suggestion @MartinM85! The specs are quite clear and it's a great way to start a new set of commands with a list command. Before we proceed I've two remarks.

Regarding the default properties, it may be interesting to drop description from the properties. This one can become quite long and then it won't render properly in text format.

Let's also make a note in the specs that we'll need to add a new permissions scope AdministrativeUnit.Read.All before merging the PR.

Are you willing to work on this issue @MartinM85?

@MartinM85
Copy link
Contributor Author

@Jwaegebaert description removed.

I will work on this issue.

@Jwaegebaert
Copy link
Contributor

Perfect, I've assigned the issue to you @MartinM85. One thing that may be interesting to know. Since you'll be working with a new permission scope that we don't have currently in the CLI you'll need to set up your own AAD identity to test it out locally. For a clear guide on how to set this up and use it locally, you can reference this page https://pnp.github.io/cli-microsoft365/user-guide/using-own-identity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request hacktoberfest Issue perfect for hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants