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: Add administrative unit #5572

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

New command: Add administrative unit #5572

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

Comments

@MartinM85
Copy link
Contributor

MartinM85 commented Oct 17, 2023

Usage

m365 aad administrativeunit add

Description

Creates a new administrative unit

Options

Option Description
-n, --displayName <displayName> Display name for the administrative unit.
-d, --description [description] Description for the administrative unit.
--hiddenMembership [hiddenMembership] Indicates whether only members of the administrative unit can list other members of the administrative unit.

Examples

Create an administrative unit with a specific display name

m365 aad administrativeunit add --displayName "Marketing Division"

Create an administrative unit with a specific display name and description

m365 aad administrativeunit add --displayName "Marketing Division" --description "Marketing department"

Create a hidden administrative unit with a specific display name

m365 aad administrativeunit add --displayName "Marketing Division" --hiddenMembership

Default properties

No response

Additional Info

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

It requires new scope AdministrativeUnit.ReadWrite.All.

I will work on this issue once #5569 is closed.

@milanholemans
Copy link
Contributor

Hi, @MartinM85. Here are a few remarks from my side:

Reading the description from the visibility property.

Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set (value is null), the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit.

Reading this description, it makes more sense to me to make a flag for it (--hiddenMembership) instead of the visibility option.

One other thing we don't like (anymore) is the descriptions for the examples where we repeat the sample data in the description.
So instead of Create an administrative unit with display name Marketing Division we should write it as Create an administrative unit with a specific display name.

@MartinM85
Copy link
Contributor Author

@milanholemans Thank you for the feedback. I've edited the specification.

@milanholemans
Copy link
Contributor

Cool! Looks good to me now!

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