graph schemaextension set
Updates a Microsoft Graph schema extension
Usage
m365 graph schemaextension set [options]
Options
-i, --id <id>The unique identifier for the schema extension definition
--owner <owner>The ID of the Microsoft Entra application that is the owner of the schema extension
-d, --description [description]Description of the schema extension
-s, --status [status]The lifecycle state of the schema extension. Accepted values are
AvailableorDeprecated-t, --targetTypes [targetTypes]Comma-separated list of Microsoft Graph resource types the schema extension targets
-p, --properties [properties]The collection of property names and types that make up the schema extension definition formatted as a JSON string
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
The lifecycle state of the schema extension. The initial state upon creation is InDevelopment.
Possible states transitions are from InDevelopment to Available and Available to Deprecated.
The target types are the set of Microsoft Graph resource types (that support schema extensions) that this schema extension definition can be applied to. This option is specified as a comma-separated list.
When using the --properties option it's possible to enter a JSON string. In PowerShell 5 to 7.2 specific escaping rules apply due to an issue. Remember that you can also use file tokens instead.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| Microsoft Graph | Application.ReadWrite.All |
| Resource | Permissions |
|---|---|
| Microsoft Graph | Application.ReadWrite.All, Directory.ReadWrite.All |
Examples
Update the description of a schema extension.
m365 graph schemaextension set --id MySchemaExtension --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --description "My schema extension"
Update the target types and properties of a schema extension.
m365 graph schemaextension set --id contoso_MySchemaExtension --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --targetTypes "Group,User" --properties '[{"name":"myProp1","type":"Integer"},{"name":"myProp2","type":"String"}]'
Change the status of a schema extension to 'Available'.
m365 graph schemaextension set --id contoso_MySchemaExtension --owner 62375ab9-6b52-47ed-826b-58e47e0e304b --status Available
Response
The command won't return a response on success.