类型“Microsoft.OutlookServices.Event"上不存在属性“iCalUId"上不、属性、存在、类型

2023-09-06 17:40:30 作者:志在梦中!

I'm using Graph API to get/list and create calendar events. Lately I was trying beta API and recently I've encountered following error on attempt to create calendar event:

The property 'iCalUId' does not exist on type 'Microsoft.OutlookServices.Event

I'm performing POST request using following address:

https://graph.microsoft.com/beta/Users('<user-id>')/calendars/<id>/events
Outlook的应用范围

with a JSON object containing 'iCalUId' property. That object was retrieved using beta version of Graph API couple of weeks ago. And at that time creation of calendar event with the same request worked properly.

Documentation states that there is such property.

The question is - am I doing something wrong? or is it beta API that was changed recently? If later - how can I know if there are changes made to beta API?

解决方案

The Outlook team made a change to their beta (https://outlook.office.com/api/beta), essentially renaming the iCalUid property to simply uid. This change has not filtered down into the Graph endpoint yet (which still expects iCalUid), causing this break. We're working on correcting this but right now I do not have any timeline.

In the meantime you can workaround the problem by using the v1.0 endpoint. Will update here as I get new information.