Cli-microsoft365: Update Microsoft Graph schema extension

Created on 10 Nov 2017  路  16Comments  路  Source: pnp/cli-microsoft365

Update MS Graph schema extension using PATCH https://graph.microsoft.com/v1.0/schemaExtensions/<id>.

  • command graph schemaextension update --id <id> --description|-d [description] --targetTypes|-t [types] --status|-s [status] --properties|-p [properties]
  • types: comma-separated list of target types
  • properties: JSON string with the properties

Note: requires #10

More information: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/schemaextension_update

good first issue new feature work in progress

All 16 comments

If changing state from indev to available/published - ask if you really want this as it鈥檚 made public to all tenants. And state that you cannot go back to indev.

Hi,

command graph schemaextension update --id <id> --description|-d [description] --targetTypes|-t [types] --status|-s [status] --properties|-p [properties]

Shouldn't we use set instead of update to remain consistent ?

Yes, you are right @ypcode. Good catch

Hi @waldekmastykarz , Can I take this one?

Of course! All yours! 馃憦

Hey @ypcode, are you still working on it?

Hi @waldekmastykarz , I unfortunately had to delay my tasks on the schema extension due to sliding pro priorities..., I won't probably be able to work on it before June. But you can leave them assigned to me except it there are more urgent need for them :)

Regards,
Yannick

June is ok. Thank you for the update 馃憤

Hey @ypcode, are you still planning to work on this?

Moving back to the backlog due to lack of response.
Free to pickup.

Hi guys @waldekmastykarz @VelinGeorgiev

Sorry for the very long lack of response :$ (shame on me!), I've been really busy for the past few months, and probably will be for another few weeks at least... If that is still free to pickup whenever I get back on track, I will ! Sorry again!

Regards,
Yannick

No problem. Thanks for letting us know 馃憤

Hi @waldekmastykarz @VelinGeorgiev

I kinda miss contributing a bit to the CLI :P I see those are still pending, I can get back on it if it's OK for you ?

Of course! Great to have you back! 馃憦

Hi @waldekmastykarz , almost done already!

However, I was a bit confused that using the command always returns a
Error: Cannot perform this extension schema write operation.

I started looking that it should probably be connected as an AAD App principal...
since this statement in the docs (https://docs.microsoft.com/en-us/graph/api/schemaextension-update?view=graph-rest-1.0&tabs=http)

Only the app that created a schema extension (owner app) can make additive updates to the extension when the extension is in the InDevelopment or Available status. That means the app cannot remove custom properties or target resource types from the definition. The app can, however, change the description of the extension.

However, it also states

Application permissions : not supported

I found in the comments of that doc page that actually, it works if you specify the owner argument with the appropriate value... and it does ! It is completely missing from the Graph documentation !

But then, should we add the argument in the command itself in order to make it work ? Or do you think it is an issue on MS Graph side that should be solved first ?

Good catch @ypcode! We should definitely include the owner option. Additionally, if possible, we should include it in the list and get commands so that users of the CLI what the owner for the particular schema extension is.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VelinGeorgiev picture VelinGeorgiev  路  3Comments

waldekmastykarz picture waldekmastykarz  路  3Comments

plamber picture plamber  路  3Comments

arjunumenon picture arjunumenon  路  3Comments

garrytrinder picture garrytrinder  路  3Comments