Add Category Color to Microsoft Graph API Event.Categories collection
The Calendar Event object contains a simple collection of category names called categories. Enhance the Event object by either:
1. Add a property to the Event object called CategoryColor, a simple collection of the colors (hex or decimal value) for each category's color. Making the colors a separate property of the event object should make this backwards compatible.
- The categories collection becomes a collection of category objects. The category object has two properties called Name and Color. Name is a string and Color can be the name of the color of the hexadecimal value of the color. This approach while cleaner, would not be backwards compatible.
Outlook Category management which provides displayName and a preset colour to be stored and retrieved is available:
The way we've worked around this in Weekly (https://www.planweekly.io) is that we fetch the events, then the categories, and then we have hard-coded the category presets to match the OWA colors (since each version of Outlook calendar across Mac, Windows, and OWA uses slightly different colors).
So if you login to our app with your O365 account, you'll see all of your events pulled in and color coded automatically according to their category color.
Steen Jessen commented
Yes, please enable Category management in the API
Agreed - when trying to display calendar events to a user, I have no way of ensuring it's the same colors as they would see it in their outlook calendar.
+1 on enabling Category management from the Graph API
Eddy De Maerschalck commented
Strange that this is implemented in the old school interfaces like Outlook 2013, but not in new-style O365. Our users find it normal to add a color to an event, but that's no more possible when those events are created by the API. How can I explain this to my customers?
Mike Noordermeer commented
There should also be a way to manage categories. Currently it is impossible to enumerate, add, change or delete categories.
One Calendar commented
I also need a way to determine all the possible categories with names and colors!
David Sarge commented
For the record, it was ME that posted this. I posted before signing in...oops.
This is an attribute that should've been included in the initial release and is already long overdue.