共有または委任された予定表内の Outlook イベントを作成するCreate Outlook events in a shared or delegated calendar

Outlook では、ユーザーが予定表を他のユーザーと共有し、他のユーザーがその予定表でイベントの表示や作成、変更を行うことができます。In Outlook, customers can share a calendar with other users and let them view, create, or modify events in that calendar. また、ユーザーは、会議出席依頼の受信と返信や、予定表項目の作成と変更を自分に代わって実行する代理人を許可することができます。Customers can also grant a delegate to act on their behalf, to receive or respond to meeting requests, or create or change items in the calendar.

Microsoft Graph は、他のユーザーによって共有された予定表のイベントの読み取りや書き込み、共有された予定表の表示、共有者用に予定表名の更新を行う機能をプログラムとしてサポートしています。Programmatically, Microsoft Graph supports reading or writing events in calendars that have been shared by other users, as well as reading the shared calendars, and updating the calendar name for sharees. サポートは、委任された予定表にも適用されます。The support also applies to calendars that have been delegated. この記事の残りの部分では、共有または委任された予定表で会議のイベントを作成する方法について説明します。The rest of this article walks through creating a meeting event in a shared or delegated calendar. イベントを取得する方法については、「共有または委任された予定表内の Outlook イベントを取得する」を参照してください。For getting events, refer to Get Outlook events in a shared or delegated calendar.

次のチュートリアルでは、Alex が Outlook の Adele にプライマリ予定表を委任し、既定の Outlook メールボックス設定を保持して、会議出席依頼と返信を代理人のみに送信するシナリオ例を使用します。The walkthrough below uses the example scenario where Alex has delegated his primary calendar to Adele in Outlook, and kept the default Outlook mailbox setting to direct meeting requests and responses to only delegates. (この設定は、既定値 sendToDelegateOnly として設定された Alex の mailboxSettingsdelegateMeetingMessageDeliveryOptions プロパティに対応しています)。(This setting corresponds to the delegateMeetingMessageDeliveryOptions property of Alex' mailboxSettings set as the default value sendToDelegateOnly.)

このチュートリアルでは、後続の手順について説明します。The walkthrough describes a few subsequent steps:

  1. Alex が委任した予定表を Adele が取得するAdele gets the calendar that Alex has delegated to her.
  2. Alex の代理人として Adele が Christie と Megan に会議出席依頼を送信するAdele sends a meeting invitation to Christie and Megan on Alex' behalf.
  3. Christie が会議出席依頼を受信し、自分の予定表の関連付けられたイベントを調べるChristie receives the meeting request, and inspects the associated event in her calendar.
  4. Christie が招待を仮承諾するChristie responds tentative to the invitation.
  5. Adele が Christie の応答メッセージを受信するAdele receives Christie's response message.
  6. Alex がイベントの一部として出席者の応答を確認するAlex checks attendees' responses as part of the event.

Alex が予定表を Adele と共有しているが委任はしていない場合は、次のようになります。If Alex has shared and not delegated his calendar with Adele:

  • Adele としてサインインした場合、アプリは Alex が Adele と共有した予定表を取得できます。Signed in as Adele, an app can get the calendar that Alex has shared with Adele.
  • アプリは手順 2 〜 4 の依頼と返信を使用して、委任された予定表と同じ方法で共有の予定表に適用できます。The app can use the requests and responses in steps 2 to 4 to apply to the shared calendar the same way as the delegated calendar.
  • 手順 5 では、アプリは Adele ではなく Alex としてサインインして、Christie の応答メッセージを受信できます。In step 5, the app can sign in as Alex, instead of Adele, to receive Christie's response message.

手順 1: Adele が委任された予定表を取得するStep 1: Adele gets the delegated calendar

Adele としてサインインし、自分がアクセスしている予定表を取得して、Alex が委任した予定表を特定します。これにより、次の手順で予定表を使用してイベントを作成できます。Signed in as Adele, get the calendars she has access to and identify the one Alex has delegated to her, so to use it in the next step to create an event in that calendar.

GET https://graph.microsoft.com/v1.0/me/calendars

成功した応答には、応答コード HTTP 200、Adele のプライマリ予定表、Adele のメールボックスで Alex によって委任された予定表のコピー、および次のプロパティが含まれています。Notice a successful response includes the response code HTTP 200, Adele's own primary calendar, and a copy of the calendar delegated by Alex in Adele's mailbox, with the following properties:

  • canShare は false です。Adele は代理人であり、予定表の所有者ではないからです。canShare is false since Adele is only a delegate and not the calendar owner.
  • canEdit は true です。Adele は代理人として、委任された予定表の非公開イベントへの書き込みアクセス権限を持っているからです。canEdit is true since as delegate, Adele has write access to non-private events in the delegated calendar.
  • ownerAlex Wilber です。これが Alex の予定表であることを示します。owner is Alex Wilber indicating it is Alex' calendar.
HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d3b9214b-dd8b-441d-b7dc-c446c9fa0e69')/calendars",
    "value": [
        {
            "id": "AQMkADGkAAAJMjAAAAA==",
            "name": "Calendar",
            "color": "auto",
            "changeKey": "NDznl+Uh50WkanaCOKHkaQAAAAACXQ==",
            "canShare": true,
            "canViewPrivateItems": true,
            "canEdit": true,
            "owner": {
                "name": "Adele Vance",
                "address": "AdeleV@contoso.OnMicrosoft.com"
            }
        },
        {
            "id": "AAMkADRpAABf0JlzAAA=",
            "name": "Alex Wilber",
            "color": "auto",
            "changeKey": "NDznl+Uh50WkanaCOKHkaQAAX8m4eQ==",
            "canShare": false,
            "canViewPrivateItems": false,
            "canEdit": true,
            "owner": {
                "name": "Alex Wilber",
                "address": "AlexW@contoso.OnMicrosoft.com"
            }
        }
    ]
}

Adele としてサインインしている場合は、GET https://graph.microsoft.com/v1.0/users/AlexW@contoso.OnMicrosoft.com/calendar のように Alex の ID と calendar ショートカットを指定することで、代わりに Alex のメールボックスから委任予定表を直接取得できます。NOTE Signed in as Adele, you can alternatively get the delegated calendar directly from Alex' mailbox, by specifying Alex' identity and the calendar shortcut, as in GET https://graph.microsoft.com/v1.0/users/AlexW@contoso.OnMicrosoft.com/calendar. 返された予定表 ID は、Alex のメールボックスのみに対応しています。The returned calendar ID corresponds to only Alex' mailbox.

手順 2: Adele が Alex の代理人として招待状を作成し送信するStep 2: Adele creates and sends an invitation on Alex' behalf

Adele としてサインインし、手順 1 で取得した予定表 ID を使用して委任された予定表にイベントを作成し、Alex の代理人として Christie と Megan に送信します。Signed in as Adele, use the calendar ID obtained from step 1 to create an event in the delegated calendar and send it to Christie and Megan, on Alex' behalf:

POST https://graph.microsoft.com/v1.0/me/calendars/AAMkADRpAABf0JlzAAA=/events

Prefer: outlook.timezone="Pacific Standard Time"
Content-type: application/json

{
  "subject": "Christmas dinner",
  "body": {
    "contentType": "HTML",
    "content": "Happy holidays!"
  },
  "start": {
      "dateTime": "2019-12-25T18:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "end": {
      "dateTime": "2019-12-25T22:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "location":{
      "displayName":"Alex' home"
  },
  "attendees": [
    {
      "emailAddress": {
        "address":"meganb@contoso.onmicrosoft.com",
        "name": "Megan Bowen"
      },
      "type": "required"
    },
    {
      "emailAddress": {
        "address":"ChristieC@contoso.onmicrosoft.com",
        "name": "Christie Cline"
      },
      "type": "required"
    }
  ]
}

成功した応答には、HTTP 201 と次のイベント プロパティが含まれています。Notice a successful response includes HTTP 201 and the following event properties:

  • isOrganizer は true に設定されています。isOrganizer is set to true. 通常、予定表の所有者 (Alex) が会議の開催者の場合は、このプロパティが true になります。In general, this property is true if the calendar owner (Alex) is the organizer of the meeting. これは、代理人 (Adele) が所有者の代わりに会議を開催した場合にも適用されます。This also applies if a delegate (Adele) organized the meeting on behalf of the owner.
  • attendees コレクションには、Megan と Christie を指定します。The attendees collection specifies Megan and Christie.
  • organizer は Alex に設定されています。Alex のプライマリ予定表で Alex の代理人 (Adele) から招待状が送信されたからです。organizer is set to Alex, since the invitation was sent by Alex' delegate (Adele) in Alex' primary calendar.
  • attendeesorganizer も、代理人 (Adele) を指定しません。Neither the attendees nor organizer specifies the delegate (Adele).
HTTP/1.1 201 Created
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d3b9214b-dd8b-441d-b7dc-c446c9fa0e69')/calendars('AAMkADRpAABf0JlzAAA%3D')/events/$entity",
    "@odata.etag": "W/\"NDznl+Uh50WkanaCOKHkaQAAX8m47Q==\"",
    "id": "AAMkADI4oeRpAABf0LrcAAA=",
    "createdDateTime": "2019-12-21T04:59:01.9766929Z",
    "lastModifiedDateTime": "2019-12-21T04:59:02.0214967Z",
    "changeKey": "NDznl+Uh50WkanaCOKHkaQAAX8m47Q==",
    "categories": [],
    "originalStartTimeZone": "Pacific Standard Time",
    "originalEndTimeZone": "Pacific Standard Time",
    "iCalUId": "040000008200FEFE0BA532444B5FD89BDE22BA103",
    "reminderMinutesBeforeStart": 15,
    "isReminderOn": false,
    "hasAttachments": false,
    "subject": "Christmas dinner",
    "bodyPreview": "Happy holidays!",
    "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=AAMkADI4oeRpAABf0LrcAAA%3D&exvsurl=1&path=/calendar/item",
    "onlineMeetingUrl": null,
    "recurrence": null,
    "responseStatus": {
        "response": "organizer",
        "time": "0001-01-01T00:00:00Z"
    },
    "body": {
        "contentType": "html",
        "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nHappy holidays!\r\n</body>\r\n</html>\r\n"
    },
    "start": {
        "dateTime": "2019-12-25T18:00:00.0000000",
        "timeZone": "Pacific Standard Time"
    },
    "end": {
        "dateTime": "2019-12-25T22:00:00.0000000",
        "timeZone": "Pacific Standard Time"
    },
    "location": {
        "displayName": "Alex' home",
        "locationType": "default",
        "uniqueId": "Alex' home",
        "uniqueIdType": "private"
    },
    "locations": [
        {
            "displayName": "Alex' home",
            "locationType": "default",
            "uniqueId": "Alex' home",
            "uniqueIdType": "private"
        }
    ],
    "attendees": [
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "Megan Bowen",
                "address": "MeganB@contoso.OnMicrosoft.com"
            }
        },
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "Christie Cline",
                "address": "ChristieC@contoso.OnMicrosoft.com"
            }
        }
    ],
    "organizer": {
        "emailAddress": {
            "name": "Alex Wilber",
            "address": "AlexW@contoso.OnMicrosoft.com"
        }
    }
}

手順 3: Christie が会議出席依頼を受信し、自分の予定表の関連付けられたイベントを調べるStep 3: Christie receives meeting request and inspects the associated event in her calendar

会議出席依頼を送信すると、Outlook は自動的に Christie の予定表に仮のイベントを作成します。Upon delivering the meeting request, Outlook automatically creates a tentative event in Christie's calendar.

Christie としてサインインし、手順 2 の会議出席依頼に関連付けられている eventMessageイベントを取得します。Signed in as Christie, get the eventMessage and event that are associated with the meeting request from step 2:

GET https://graph.microsoft.com/v1.0/me/messages/AAMkADADVj3fyAABZ5hYdAAA=?$expand=microsoft.graph.eventMessage/event

成功した応答には、応答コード HTTP 200 と次の eventMessage プロパティが含まれています。Notice a successful response includes the response code HTTP 200 and the following eventMessage properties:

  • meetingMessageType はこのメッセージが meetingRequest であることを指定します。meetingMessageType specifies this message is meetingRequest.
  • sender は Adele です。sender is Adele.
  • from は Alex です。from is Alex.
  • toRecipients には Megan と Christie が含まれます。toRecipients include Megan and Christie.

また、次のイベント プロパティも含まれています。And the following event properties:

  • attendees には、Alex、Megan および Christie が含まれています。attendees include Alex, Megan, and Christie.
  • organizer は Alex です。organizer is Alex.

Adele の ID は eventMessagesender プロパティにのみ表示され、関連するイベントには表示されません。Adele's identity appears only in the sender property of the eventMessage and not in the associated event.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('662b947c-d9a1-4064-926c-eba1316d4462')/messages(microsoft.graph.eventMessage/event())/$entity",
    "@odata.type": "#microsoft.graph.eventMessage",
    "@odata.etag": "W/\"CwAAABYAAADK82uJYVo4RrFV3ADVj3fyAABZ378h\"",
    "id": "AAMkADADVj3fyAABZ5hYdAAA=",
    "createdDateTime": "2019-12-21T04:59:03Z",
    "lastModifiedDateTime": "2019-12-21T04:59:04Z",
    "changeKey": "CwAAABYAAADK82uJYVo4RrFV3ADVj3fyAABZ378h",
    "categories": [],
    "receivedDateTime": "2019-12-21T04:59:03Z",
    "sentDateTime": "2019-12-21T04:59:01Z",
    "hasAttachments": false,
    "internetMessageId": "<DM6PR17MB3593711A1C0A098167F5A977A12C0@DM6PR17MB3593.namprd17.prod.outlook.com>",
    "subject": "Christmas dinner",
    "bodyPreview": "Happy holidays!",
    "importance": "normal",
    "parentFolderId": "AQMkADIAAAIBDAAAAA==",
    "conversationId": "AAQkADNqQlzYAM8jQM=",
    "conversationIndex": "AdW3u1xx5S7TYrbluE2pCXNgAzyNAw==",
    "isDeliveryReceiptRequested": null,
    "isReadReceiptRequested": false,
    "isRead": true,
    "isDraft": false,
    "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADADVj3fyAABZ5hYdAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
    "inferenceClassification": "focused",
    "meetingMessageType": "meetingRequest",
    "body": {
        "contentType": "html",
        "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nHappy holidays!\r\n</body>\r\n</html>\r\n"
    },
    "sender": {
        "emailAddress": {
            "name": "Adele Vance",
            "address": "AdeleV@contoso.OnMicrosoft.com"
        }
    },
    "from": {
        "emailAddress": {
            "name": "Alex Wilber",
            "address": "AlexW@contoso.OnMicrosoft.com"
        }
    },
    "toRecipients": [
        {
            "emailAddress": {
                "name": "Megan Bowen",
                "address": "MeganB@contoso.OnMicrosoft.com"
            }
        },
        {
            "emailAddress": {
                "name": "Christie Cline",
                "address": "ChristieC@contoso.OnMicrosoft.com"
            }
        }
    ],
    "ccRecipients": [],
    "bccRecipients": [],
    "replyTo": [],
    "flag": {
        "flagStatus": "notFlagged"
    },
    "event@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('662b947c-d9a1-4064-926c-eba1316d4462')/messages('AAMkADADVj3fyAABZ5hYdAAA%3D')/microsoft.graph.eventMessage/microsoft.graph.eventMessage/event/$entity",
    "event": {
        "@odata.etag": "W/\"yvNriWFaOEaxVdwA1Y938gAAX+T7Jg==\"",
        "id": "AAMkADADVj3fyAABZ5ieyAAA=",
        "createdDateTime": "2019-12-21T04:59:03.4336242Z",
        "lastModifiedDateTime": "2019-12-27T01:38:32.3766961Z",
        "changeKey": "yvNriWFaOEaxVdwA1Y938gAAX+T7Jg==",
        "categories": [],
        "originalStartTimeZone": "Pacific Standard Time",
        "originalEndTimeZone": "Pacific Standard Time",
        "iCalUId": "040000008200FEFE0BA532444B5FD89BDE22BA103",
        "reminderMinutesBeforeStart": 15,
        "isReminderOn": true,
        "hasAttachments": false,
        "subject": "Christmas dinner",
        "bodyPreview": "Happy holidays!",
        "importance": "normal",
        "sensitivity": "normal",
        "isAllDay": false,
        "isCancelled": false,
        "isOrganizer": false,
        "responseRequested": true,
        "seriesMasterId": null,
        "showAs": "tentative",
        "type": "singleInstance",
        "webLink": "https://outlook.office365.com/owa/?itemid=AAMkADADVj3fyAABZ5ieyAAA%3D&exvsurl=1&path=/calendar/item",
        "onlineMeetingUrl": null,
        "recurrence": null,
        "responseStatus": {
            "response": "none",
            "time": "2019-12-21T05:16:48.8931825Z"
        },
        "body": {
            "contentType": "html",
            "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nHappy holidays!\r\n</body>\r\n</html>\r\n"
        },
        "start": {
            "dateTime": "2019-12-26T02:00:00.0000000",
            "timeZone": "UTC"
        },
        "end": {
            "dateTime": "2019-12-26T06:00:00.0000000",
            "timeZone": "UTC"
        },
        "location": {
            "displayName": "Alex' home",
            "locationType": "default",
            "uniqueId": "Alex' home",
            "uniqueIdType": "private"
        },
        "locations": [
            {
                "displayName": "Alex' home",
                "locationType": "default",
                "uniqueId": "1396aaf3-e344-4567-a4e3-797557ec24c8",
                "uniqueIdType": "locationStore"
            }
        ],
        "attendees": [
            {
                "type": "required",
                "status": {
                    "response": "none",
                    "time": "0001-01-01T00:00:00Z"
                },
                "emailAddress": {
                    "name": "Alex Wilber",
                    "address": "AlexW@contoso.OnMicrosoft.com"
                }
            },
            {
                "type": "required",
                "status": {
                    "response": "none",
                    "time": "0001-01-01T00:00:00Z"
                },
                "emailAddress": {
                    "name": "Megan Bowen",
                    "address": "MeganB@contoso.OnMicrosoft.com"
                }
            },
            {
                "type": "required",
                "status": {
                    "response": "none",
                    "time": "0001-01-01T00:00:00Z"
                },
                "emailAddress": {
                    "name": "Christie Cline",
                    "address": "ChristieC@contoso.OnMicrosoft.com"
                }
            }
        ],
        "organizer": {
            "emailAddress": {
                "name": "Alex Wilber",
                "address": "AlexW@contoso.OnMicrosoft.com"
            }
        }
    }
}

手順 4: Christie 会議出席依頼に返信するStep 4: Christie responds to the meeting request

Christie としてサインインし、イベントに暫定的に応答します。応答には応答メッセージを含めます。Signed in as Christie, reply to the event as tentative, and include a reply message in the response:

POST https://graph.microsoft.com/v1.0/me/events/AAMkADADVj3fyAABZ5ieyAAA=/tentativelyAccept
Content-type: application/json

{
  "comment": "I will probably be able to make it.",
  "sendResponse": true
}

成功した応答は、HTTP 202 Accepted を返します。A successful response returns HTTP 202 Accepted.

HTTP/1.1 202 Accepted

手順 5: Adele が応答メッセージを受信するStep 5: Adele receives the response message

Adele は Alex のプライマリ予定表の代理人なので、Adele は Alex の代わりに予定表のすべての会議出席依頼の返信を受信します。Because Adele is a delegate of Alex' primary calendar, Adele receives all meeting responses for that calendar on Alex' behalf.

Adele としてサインインし、手順 4 で Christie からの応答を表す eventMessage を取得します。Signed in as Adele, get the eventMessage that represents the response from Christie in step 4:

GET https://graph.microsoft.com/v1.0/me/messages/AAMkADI4oeRpAABf0HJUAAA=

成功した応答には、応答コード HTTP 200 と次の eventMessage プロパティが含まれています。Notice a successful response includes the response code HTTP 200 and the following eventMessage properties:

  • meetingMessageTypemeetingTenativelyAccepted です。meetingMessageType is meetingTenativelyAccepted.
  • from は Christie です。from is Christie.
  • toRecipients には Adele のみが含まれ、予定表の所有者である Alex は含まれません。toRecipients includes only Adele, but not the calendar owner Alex. これは Alex が既定 (Outlook がすべての会議出席依頼の返信を代理人のみに送信する) を維持したからです。This is because Alex kept the default to have Outlook direct all meeting responses to only delegates.
HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('d3b9214b-dd8b-441d-b7dc-c446c9fa0e69')/messages/$entity",
    "@odata.type": "#microsoft.graph.eventMessage",
    "@odata.etag": "W/\"DAAAABYAAAA0POeX5SHnRaRqdoI4oeRpAABfybkT\"",
    "id": "AAMkADI4oeRpAABf0HJUAAA=",
    "createdDateTime": "2019-12-21T05:16:55Z",
    "lastModifiedDateTime": "2019-12-21T05:16:57Z",
    "changeKey": "DAAAABYAAAA0POeX5SHnRaRqdoI4oeRpAABfybkT",
    "categories": [],
    "receivedDateTime": "2019-12-21T05:16:56Z",
    "sentDateTime": "2019-12-21T05:16:49Z",
    "hasAttachments": false,
    "internetMessageId": "<86880ccb8ec64184996e46eaddaed279@DM6PR17MB3593.namprd17.prod.outlook.com>",
    "subject": "Tentative: Christmas dinner",
    "bodyPreview": "I will probably be able to make it.",
    "importance": "normal",
    "parentFolderId": "AQMkAD5GkAAAIBDAAAAA==",
    "conversationId": "AAQkADK25bhNqQlzYAM8jQM=",
    "conversationIndex": "AdW3u1xx5S7TYrbluE2pCXNgAzyNAwAAoBoZ",
    "isDeliveryReceiptRequested": null,
    "isReadReceiptRequested": false,
    "isRead": false,
    "isDraft": false,
    "webLink": "https://outlook.office365.com/owa/?ItemID=AAMkADI4oeRpAABf0HJUAAA%3D&exvsurl=1&viewmodel=ReadMessageItem",
    "inferenceClassification": "focused",
    "meetingMessageType": "meetingTenativelyAccepted",
    "body": {
        "contentType": "html",
        "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nI will probably be able to make it.\r\n</body>\r\n</html>\r\n"
    },
    "sender": {
        "emailAddress": {
            "name": "Christie Cline",
            "address": "ChristieC@contoso.OnMicrosoft.com"
        }
    },
    "from": {
        "emailAddress": {
            "name": "Christie Cline",
            "address": "ChristieC@contoso.OnMicrosoft.com"
        }
    },
    "toRecipients": [
        {
            "emailAddress": {
                "name": "Adele Vance",
                "address": "AdeleV@contoso.OnMicrosoft.com"
            }
        }
    ],
    "ccRecipients": [],
    "bccRecipients": [],
    "replyTo": [],
    "flag": {
        "flagStatus": "notFlagged"
    }
}

手順 6: Alex がイベントの一部として応答にアクセスするStep 6: Alex accesses responses as part of the event

Alex は既定で Outlook がすべての会議出席依頼と返信を代理人のみに送信するように設定しているため、Alex は手順 4 からの Christie の応答を受信しません。Because Alex kept the default to have Outlook direct all meeting requests and responses to only delegates, Alex does not receive Christie's response from step 4. ただし、自分のプライマリ予定表のイベントで応答を取得できます。He can however get the response through the event in his primary calendar.

Alex としてサインインし、手順 2 で Adele が作成したイベントを取得し、attendees プロパティから応答を取得します。Signed in as Alex, get the event that Adele created in step 2 and get responses from the attendees property:

GET https://graph.microsoft.com/v1.0/me/calendar/events/AAMkADJXJGu0AABf02qwAAA=

成功した応答には、応答コード HTTP 200 と次のイベント プロパティが含まれています。Notice a successful response includes the response code HTTP 200 and the following event properties:

  • isOrganizer は true です。isOrganizer is true.
  • attendees には、Megan と Christie のみが含まれています。attendees include only Megan and Christie.
  • attendee インスタンスの status プロパティは、出席者からの応答を示します。The status property of each attendee instance indicates any response from the attendee:
    • Megan の応答は none です。Megan's response is none.
    • Christie の応答は tentativelyAccepted です。Christie's response is tentativelyAccepted.
  • organizer は Alex です。organizer is Alex.
  • 返されたイベントのプロパティは、代理人 (Adele) を示していません。No property in the returned event indicates the delegate, Adele.
HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('64339082-ed84-4b0b-b4ab-004ae54f3747')/calendars('AQMkADAw7QAAAJfygAAAA%3D%3D')/events/$entity",
    "@odata.etag": "W/\"NEXywgsVrkeNsFsyVyRrtAAAX8xuhA==\"",
    "id": "AAMkADJXJGu0AABf02qwAAA=",
    "createdDateTime": "2019-12-21T04:59:01.4435895Z",
    "lastModifiedDateTime": "2019-12-21T05:16:54.689345Z",
    "changeKey": "NEXywgsVrkeNsFsyVyRrtAAAX8xuhA==",
    "categories": [],
    "originalStartTimeZone": "Pacific Standard Time",
    "originalEndTimeZone": "Pacific Standard Time",
    "iCalUId": "040000008200FEFE0BA532444B5FD89BDE22BA103",
    "reminderMinutesBeforeStart": 15,
    "isReminderOn": true,
    "hasAttachments": false,
    "subject": "Christmas dinner",
    "bodyPreview": "Happy holidays!",
    "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=AAMkADJXJGu0AABf02qwAAA%3D&exvsurl=1&path=/calendar/item",
    "onlineMeetingUrl": null,
    "recurrence": null,
    "responseStatus": {
        "response": "organizer",
        "time": "0001-01-01T00:00:00Z"
    },
    "body": {
        "contentType": "html",
        "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\nHappy holidays!\r\n</body>\r\n</html>\r\n"
    },
    "start": {
        "dateTime": "2019-12-26T02:00:00.0000000",
        "timeZone": "UTC"
    },
    "end": {
        "dateTime": "2019-12-26T06:00:00.0000000",
        "timeZone": "UTC"
    },
    "location": {
        "displayName": "Alex' home",
        "locationType": "default",
        "uniqueId": "Alex' home",
        "uniqueIdType": "private"
    },
    "locations": [
        {
            "displayName": "Alex' home",
            "locationType": "default",
            "uniqueId": "Alex' home",
            "uniqueIdType": "private"
        }
    ],
    "attendees": [
        {
            "type": "required",
            "status": {
                "response": "none",
                "time": "0001-01-01T00:00:00Z"
            },
            "emailAddress": {
                "name": "Megan Bowen",
                "address": "MeganB@contoso.OnMicrosoft.com"
            }
        },
        {
            "type": "required",
            "status": {
                "response": "tentativelyAccepted",
                "time": "2019-12-21T05:16:48.8931825Z"
            },
            "emailAddress": {
                "name": "Christie Cline",
                "address": "ChristieC@contoso.OnMicrosoft.com"
            }
        }
    ],
    "organizer": {
        "emailAddress": {
            "name": "Alex Wilber",
            "address": "AlexW@contoso.OnMicrosoft.com"
        }
    }
}

次の手順Next steps

詳細情報:Find out more about: