Update the writable property, color, of the specified outlookCategory object. You cannot modify the displayName property
once you have created the category.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body
will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.
Property
Type
Description
color
String
A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors.
Response
If successful, this method returns a 200 OK response code and updated outlookCategory object in the response body.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewOutlookCategory()
color := "preset15"
requestBody.SetColor(&color)
outlookCategoryId := "outlookCategory-id"
graphClient.Me().Outlook().MasterCategoriesById(&outlookCategoryId).Patch(requestBody)
Import-Module Microsoft.Graph.Users
$params = @{
Color = "preset15"
}
# A UPN can also be used as -UserId.
Update-MgUserOutlookMasterCategory -UserId $userId -OutlookCategoryId $outlookCategoryId -BodyParameter $params