Не удается обновить имена участников мероприятия с помощью API Microsoft Graph - PullRequest
0 голосов
/ 18 июня 2020

Следующее было предпринято с использованием Microsoft Graph API Graph Explorer для устранения любых сторонних причин. В календаре Outlook есть событие:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('WWWW')/calendars('XXXX')/events/$entity",
    "@odata.etag": "W/\"wIqdPsepnEOtI+GbtqRT1gAAElvUsQ==\"",
    "id": "YYYY",
    "createdDateTime": "2020-06-18T05:19:22.5766648Z",
    "lastModifiedDateTime": "2020-06-18T17:17:23.3143899Z",
    "changeKey": "wIqdPsepnEOtI+GbtqRT1gAAElvUsQ==",
    "categories": [],
    "originalStartTimeZone": "UTC",
    "originalEndTimeZone": "UTC",
    "iCalUId": "ZZZZ",
    "reminderMinutesBeforeStart": 15,
    "isReminderOn": false,
    "hasAttachments": false,
    "subject": "Review proposal",
    "bodyPreview": "",
    "importance": "normal",
    "sensitivity": "normal",
    "isAllDay": false,
    "isCancelled": false,
    "isOrganizer": true,
    "responseRequested": true,
    "seriesMasterId": null,
    "showAs": "busy",
    "type": "singleInstance",
    "webLink": "https://outlook.office365.com/owa/?itemid=YYY&exvsurl=1&path=/calendar/item",
    "onlineMeetingUrl": null,
    "isOnlineMeeting": false,
    "onlineMeetingProvider": "unknown",
    "allowNewTimeProposals": true,
    "recurrence": null,
    "onlineMeeting": null,
    "responseStatus": {
        "response": "organizer",
        "time": "0001-01-01T00:00:00Z"
    },
    "body": {
        "contentType": "text",
        "content": ""
    },
    "start": {
        "dateTime": "2020-06-26T14:30:00.0000000",
        "timeZone": "UTC"
    },
    "end": {
        "dateTime": "2020-06-26T15:00:00.0000000",
        "timeZone": "UTC"
    },
    "location": {
        "displayName": "",
        "locationType": "default",
        "uniqueIdType": "unknown",
        "address": {},
        "coordinates": {}
    },
    "locations": [],
    "attendees": [
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "attendee@example.com",
                "address": "attendee@example.com"
            }
        },
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "Bob Smith",
                "address": "organizer@example.com"
            }
        }
    ],
    "organizer": {
        "emailAddress": {
            "name": "Bob Smith",
            "address": "organizer@example.com"
        }
    }
}

Имя участника не было известно во время создания события. Было дано attendee@example.com, что привело к появлению участника, чье имя и адрес электронной почты были attendee@example.com. Позже стало известно имя посетителя. Запрос исправления отправляется в календарь организатора через Microsoft Graph API, чтобы обновить событие с целью перезаписать имя участника, но оставить адрес электронной почты как есть.

{
    "@odata.type": "#microsoft.graph.event",
    "attendees": [{
        "status": {
            "response": "none",
            "time": "0001-01-01T00:00:00Z"
        },
        "type": "required",
        "emailAddress": {
            "address": "attendee@example.com",
            "name": "Julie Williams"
        }
    }, {
        "status": {
            "response": "none"
        },
        "type": "required",
        "emailAddress": {
            "address": "organizer@example.com",
            "name": "Bob Smith"
        }
    }],
    "createdDateTime": "2020-06-18T05:19:22.5766648Z",
    "end": {
        "dateTime": "2020-06-26T15:00:00",
        "timeZone": "UTC"
    },
    "iCalUId": "ZZZZ",
    "id": "YYYY",
    "importance": "normal",
    "isOrganizer": true,
    "lastModifiedDateTime": "2020-06-18T05:19:23.7881324Z",
    "location": {},
    "organizer": {
        "emailAddress": {
            "address": "organizer@example.com",
            "name": "Bob Smith"
        }
    },
    "originalEndTimeZone": "Eastern Standard Time",
    "originalStartTimeZone": "Eastern Standard Time",
    "reminderMinutesBeforeStart": 15,
    "responseRequested": true,
    "responseStatus": {
        "response": "organizer",
        "time": "0001-01-01T00:00:00Z"
    },
    "sensitivity": "normal",
    "showAs": "busy",
    "start": {
        "dateTime": "2020-06-26T14:30:00",
        "timeZone": "UTC"
    },
    "subject": "Review proposal",
    "type": "singleInstance",
    "webLink": "https://outlook.office365.com/owa/?itemid=YYYY&exvsurl=1&path=/calendar/item"
}

Ответ показывает, что имя участника не изменилось.

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('WWWW')/calendars('XXXX')/events/$entity",
    "@odata.etag": "W/\"wIqdPsepnEOtI+GbtqRT1gAAElvUsQ==\"",
    "id": "YYYY",
    "createdDateTime": "2020-06-18T05:19:22.5766648Z",
    "lastModifiedDateTime": "2020-06-18T17:17:23.3143899Z",
    "changeKey": "wIqdPsepnEOtI+GbtqRT1gAAElvUsQ==",
    "categories": [],
    "originalStartTimeZone": "UTC",
    "originalEndTimeZone": "UTC",
    "iCalUId": "ZZZZ",
    "reminderMinutesBeforeStart": 15,
    "isReminderOn": false,
    "hasAttachments": false,
    "subject": "Review proposal",
    "bodyPreview": "",
    "importance": "normal",
    "sensitivity": "normal",
    "isAllDay": false,
    "isCancelled": false,
    "isOrganizer": true,
    "responseRequested": true,
    "seriesMasterId": null,
    "showAs": "busy",
    "type": "singleInstance",
    "webLink": "https://outlook.office365.com/owa/?itemid=YYYY&exvsurl=1&path=/calendar/item",
    "onlineMeetingUrl": null,
    "isOnlineMeeting": false,
    "onlineMeetingProvider": "unknown",
    "allowNewTimeProposals": true,
    "recurrence": null,
    "onlineMeeting": null,
    "responseStatus": {
        "response": "organizer",
        "time": "0001-01-01T00:00:00Z"
    },
    "body": {
        "contentType": "text",
        "content": ""
    },
    "start": {
        "dateTime": "2020-06-26T14:30:00.0000000",
        "timeZone": "UTC"
    },
    "end": {
        "dateTime": "2020-06-26T15:00:00.0000000",
        "timeZone": "UTC"
    },
    "location": {
        "displayName": "",
        "locationType": "default",
        "uniqueIdType": "unknown",
        "address": {},
        "coordinates": {}
    },
    "locations": [],
    "attendees": [
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "attendee@example.com",
                "address": "attendee@example.com"
            }
        },
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "Bob Smith",
                "address": "organizer@example.com"
            }
        }
    ],
    "organizer": {
        "emailAddress": {
            "name": "Bob Smith",
            "address": "organizer@example.com"
        }
    }
}

Следует ли мне ожидать, что имя участника будет обновлено? Есть ли другой способ сделать это?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...