msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

New-MgUserOutlookMasterCategory NullReference exception in 0.9.1

Open sergeyz7 opened this issue 6 years ago • 1 comments

Appears to be a local parsing/validation error, as no request to Graph is actually issued. Works as expected in version 0.7.0 of the module.

sergeyz7 avatar Aug 27 '20 11:08 sergeyz7

This is a duplicate of #337 . A fix has been made and will be available in the next release.

A workaround is set an empty -additionalProperties @{} when using expanded properties

 New-MgUserOutlookMasterCategory -UserId $userId -Color "preset9" -DisplayName "Project expense" -AdditionalProperties @{}

or use -BodyParameter

New-MgUserOutlookMasterCategory -UserId $userId -BodyParameter @{Color = "preset9"; DisplayName = "Project expense"; }

See discussions here https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/337#issuecomment-674313890

peombwa avatar Aug 27 '20 15:08 peombwa