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: m365 graph directoryextension add #6316

Open
MartinM85 opened this issue Sep 5, 2024 · 5 comments · May be fixed by #6327
Open

New command: m365 graph directoryextension add #6316

MartinM85 opened this issue Sep 5, 2024 · 5 comments · May be fixed by #6327

Comments

@MartinM85
Copy link
Contributor

MartinM85 commented Sep 5, 2024

Usage

m365 graph directoryextension add

Description

Creates a new directory extension

Options

Option Description
-n, --name <name> The name of the directory extension
--appId [appId] Application (client) ID of the Entra application where the directory extension is registered. Specify either appId, appObjectId or appName, but not multiple.
--appObjectId [appObjectId] Object ID of the Entra application where the directory extension is registered. Specify either appId, appObjectId or appName, but not multiple.
--appName [appName] The name of Entra application where the directory extension is registered. Specify either appId, appObjectId or appName, but not multiple.
--dataType <dataType> The data type of the value the extension property can hold. Possible values are: Binary, Boolean, DateTime, Integer, LargeInteger and String.
targetObjects <targetObjects> Comma-separated list of Microsoft Graph resources that can use the extension. Possible values are: User, Group, Application, AdministrativeUnit, Device and Organization.
--isMultiValued Defines the directory extension as a multi-valued property

Examples

Create a new directory extension of string type defined for user resource.

m365 graph directoryextension add --name gitHubWorkAccountName --appName ContosoApp --targetObjects User --dataType String

Create a new multi-valued directory extension of integer type defined for device and application resource

m365 graph directoryextension add --name departmentIds --appId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --targetObjects 'Application,Device' --dataType Integer --isMultiValued

Default properties

No response

Additional Info

Directory extensions allow to add custom data to user, group, administrative unit, application, device and organization resources inside the Microsoft Graph.

@milanholemans
Copy link
Contributor

Nice spec @MartinM85, the only thing I would change is the description. Defines the directory extension doesn't say much in my opinion. Let's try something like Adds a new directory extension or Creates a new directory extension.

Are you willing to implement this? Or should we open it up?

@milanholemans
Copy link
Contributor

I'd like to remind you that we require all new commands to be using a ZOD scheme. You can find some examples in login, spo site get or: #6214, #6216, #6303

@MartinM85
Copy link
Contributor Author

@milanholemans Description upgraded
Regarding to ZOD, should I use a ZOD scheme for commands that are already in pull requests?

@milanholemans
Copy link
Contributor

Actually, we are asking that all new commands use the ZOD scheme indeed.

@MartinM85
Copy link
Contributor Author

I will take this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants