msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
New-MgUserOutlookMasterCategory NullReference exception in 0.9.1
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.
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