Return incorrect validation error when creating event and event's start/end field's time zone is set to "Africa/Casablanca" which is different from the time zone in user's Outlook settings

eric lin 21 Reputation points
2022-11-28T02:43:28.38+00:00

When I create new Event using "POST /me/events" API, if new event's start/end field's time zone is set as following:
New Event's start/end field's time zone is set to: "Africa/Casablanca"
User's Outlook 365 time zone settings is set to "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi"
The API will return incorrect validation error:
{"error":{"code":"ErrorPropertyValidationFailure","message":"At least one property failed validation."}}

The request body:
{
"allowNewTimeProposals" : false,
"attendees" : [ {
"emailAddress" : {
"address" : "jason.butler@oec .com",
"name" : "Jayson Butler"
},
"type" : "required"
} ],
"body" : {
"content" : "meeting content\n\nhttp://localhost:3000/webx/index.html#boOCLG-app&/detail/4\n",
"contentType" : "text"
},
"start" : {
"dateTime" : "2022-11-30T10:30:00",
"timeZone" : "Africa/Casablanca"
},
"end" : {
"dateTime" : "2022-11-30T10:45:00",
"timeZone" : "Africa/Casablanca"
},
"hasAttachments" : false,
"hideAttendees" : false,
"importance" : "normal",
"sensitivity" : "normal",
"location" : {
"address" : { },
"locationType" : "conferenceRoom"
},
"reminderMinutesBeforeStart" : 0,
"responseRequested" : false,
"subject" : "subject",
"extension" : { },
"isAllDay" : false,
"isCancelled" : false,
"isDraft" : false,
"isOnlineMeeting" : false,
"isOrganizer" : false,
"isReminderOn" : false
}

This error is strange, as "Africa/Casablanca" time zone can be found in Outlook 365's user settings: "(UTC+01:00) Casablanca"
Even if I change the time zone setting to "(UTC+01:00) Casablanca" in user's Outlook 365, this validation error still occurs.
Please help to take a look.
Thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,662 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. eric lin 21 Reputation points
    2022-11-28T03:01:16.357+00:00

    Verified that this issue is fixed, you can close this issue.