New-MgOauth2PermissionGrant : Missing property: clientId

I was trying to add some permissions to the (new) SPFx app. This is done using the New-MgOauth2PermissionGrant  cmdlet. All examples shows using it with -BodyParameter :

But this did not work for me. All I got back was an error

New-MgOauth2PermissionGrant : Missing property: clientId 

I got it working by passing each property by itself instead:

 

This entry was posted in Development, Tips and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *