Office 365 default Calendar's ID changes automatically

眉间皱痕 提交于 2019-12-25 08:29:55

问题


I was using V2 DLL of Office 365 API for performing calendar operations. I am saving default calendar's ID for performing operations on it.

It was working fine for me from last two years but lately since last 1 month, when I am trying to fetch calendars from my account - just to check if the calendar is available on whom I am trying to work on - the calendar ID fetched is different from the calendar ID fetched from O365 API

Saved Calendar ID - AQMkADc5NDI0NjFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX8jvkC_BGp2m1nqTgcABqRbG9B8nEivpWgOOBcJGwAAAgEGAAAABqRbG9B8nEivpWgOOBcJGwABH-QZPwAAAA==

New Response -

[{
    "IsBooking": false,
    "IsAdditional": false,
    "CalendarName": "Calendar",
    "CalendarId": "AQMkADc5NDI0NjFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX8jvkC_BGp2m1nqTgcABqRbG9B8nEivpWgOOBcJGwAAAgEGAAAABqRbG9B8nEivpWgOOBcJGwABHKkz6wAAAA==",
    "Selected": false,
    "IsDefault": true,
    "HasWriteAccess": true,
    "IsFreeBusy": true,
    "EWS_URL": null,
    "CalendarColour": "#5D61DF",
    "TimeZoneId": null
}]

However the change is not permanent and after a day or so, when tried again, the calendar id changes back to same id saved in db as default calendar id.

The ID of calendar is calendar's unique identifier. However in many cases, it's value is changed. Is there any way by which we can identify the same calendar using changeKey? Any idea how we can use changeKey property?

I find it strange too but only last 30-35 characters changed for calendar id. May be something wrong with encryption algorithm. Please suggest.


回答1:


I am circling back with the team on this one. The Id of a folder should never change. It is based on the PR_ENTRYID of the folder in store which is immutable within a mailbox. I am not sure what extra goodness they stuff in the id in REST - it does appear there is some concatenation going on.

As for change key, it isn't related directly to the id, so there really isn't a way to convert from the change key to the id. This appears to simply be a bug on our side. But of course, the change key changes whenever there is a change to the folder and is an opaque blob (even to us at the OData and EWS layer).

Of interest, you could also request the PR_ENTRYID extended property with your fetches and you should see that the underlying id is always the same. But that wouldn't fix anything other than to future your understanding of what is going on under the covers.

I will post back when I get a response from them.



来源:https://stackoverflow.com/questions/41478331/office-365-default-calendars-id-changes-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!