Skip to content

Booking type causes sync to fail #420

Description

@marcoancona

It appears that events created from Microsoft Bookings (https://learn.microsoft.com/en-us/microsoft-365/bookings/bookings-overview?view=o365-worldwide) have a different schema.

Here, for example, a SyncFolderItemsResponse containing an update of Booking type.

{
    "__prefix": "s",
    "__xmlns": {
        "s": "http://schemas.xmlsoap.org/soap/envelope/",
        "h": "http://schemas.microsoft.com/exchange/services/2006/types",
        "xsd": "http://www.w3.org/2001/XMLSchema",
        "xsi": "http://www.w3.org/2001/XMLSchema-instance",
        "m": "http://schemas.microsoft.com/exchange/services/2006/messages",
        "t": "http://schemas.microsoft.com/exchange/services/2006/types"
    },
    "Header": {
        "__prefix": "s",
        "ServerVersionInfo": {
            "__prefix": "h",
            "__type": "ServerVersionInfo",
            "MajorVersion": "15",
            "MinorVersion": "20",
            "MajorBuildNumber": "5944",
            "MinorBuildNumber": "19",
            "Version": "V2018_01_08"
        }
    },
    "Body": {
        "__prefix": "s",
        "SyncFolderItemsResponse": {
            "__prefix": "m",
            "__type": "SyncFolderItemsResponse",
            "ResponseMessages": {
                "__prefix": "m",
                "__type": "ResponseMessages",
                "SyncFolderItemsResponseMessage": {
                    "__prefix": "m",
                    "__type": "SyncFolderItemsResponseMessage",
                    "ResponseClass": "Success",
                    "ResponseCode": "NoError",
                    "SyncState": "XXX...XXX",
                    "IncludesLastItemInRange": "true",
                    "Changes": {
                        "__prefix": "m",
                        "__type": "Changes",
                        "Update": {
                            "__prefix": "t",
                            "__type": "Update",
                            "Booking": {
                                "__prefix": "t",
                                "__type": "Booking",
                                "ItemId": {
                                    "__prefix": "t",
                                    "__type": "ItemId",
                                    "Id": "AAMkADZkYWYzNzY2LWFjN2EtNDFjOS1hYzVhLTZlMGE5ODJlYjU3OABGAAAAAAD9RG+Xd/5qRYlD3TDYDmiqBwAMRD6BvLPtR5EDDbxarne7AAAAAAENAAAMRD6BvLPtR5EDDbxarne7AAIXUBnTAAA=",
                                    "ChangeKey": "TgAAABYAAAAMRD6BvLPtR5EDDbxarne7AAIVyTtN"
                                },
                                "PreBuffer": "0",
                                "PostBuffer": "0",
                                "PricingType": "Undefined",
                                "Price": "0",
                                "BookingFee": "0",
                                "BookingTax": "0",
                                "SelfServiceId": "00000000-0000-0000-0000-000000000000"
                            }
                        }
                    }
                }
            }
        }
    }
}

This causes the parsing to fail. Depending on the API called, we see either The type of the object in the store (Booking) does not match that of the local object (CalendarItem). (when using LoadPropertiesForItems) or Cannot read property of null (reading 'LoadFromXmlJsObject') (when using SyncFolderItems).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions