Crie eventos do Outlook em um calendário compartilhado ou delegadoCreate Outlook events in a shared or delegated calendar

No Outlook, os clientes podem compartilhar um calendário com outros usuários e permitir que eles vejam, criem ou modifiquem eventos nesse calendário.In Outlook, customers can share a calendar with other users and let them view, create, or modify events in that calendar. Os clientes também podem permitir que um representante aja em nome deles, para receber ou responder a solicitações de reunião ou então para criar ou alterar itens no calendário.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.

Programaticamente, o Microsoft Graph oferece suporte à leitura e à criação de eventos em calendários que foram compartilhadas por outros usuários, além de leitura da calendários compartilhados e da atualização do nome do calendário para compartilhados.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. O suporte também se aplica a calendários que foram delegados.The support also applies to calendars that have been delegated. O restante deste artigo discorre sobre a criação de um evento de reunião em um calendário compartilhado ou delegado.The rest of this article walks through creating a meeting event in a shared or delegated calendar. Para obter eventos, consulteObter eventos do Outlook em um calendário compartilhado ou delegado.For getting events, refer to Get Outlook events in a shared or delegated calendar.

A instrução a seguir usa o cenário de exemplo em que Alex delega seu calendário principal à Adele no Outlook e mantém a configuração de caixa de correio do Outlook padrão para direcionar solicitações de reunião e respostas apenas às pessoas delegadas.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. (Esta configuração corresponde à propriedade delegateMeetingMessageDeliveryOptions de mailboxSettings do Alex, definida como o valor padrão sendToDelegateOnly).(This setting corresponds to the delegateMeetingMessageDeliveryOptions property of Alex' mailboxSettings set as the default value sendToDelegateOnly.)

A instrução passo a passo descreve algumas etapas subsequentes:The walkthrough describes a few subsequent steps:

  1. Adele obtém o calendário que Alex delegou a ela.Adele gets the calendar that Alex has delegated to her.
  2. Adele envia um convite de reunião para Clara e Sara em nome de Alex.Adele sends a meeting invitation to Christie and Megan on Alex' behalf.
  3. Clara recebe a solicitação de reunião e examina o evento associado no seu calendário.Christie receives the meeting request, and inspects the associated event in her calendar.
  4. Clara responde com um “talvez” ao convite.Christie responds tentative to the invitation.
  5. Adele recebe a mensagem de resposta da Clara.Adele receives Christie's response message.
  6. Alex verifica as respostas dos participantes como parte do evento.Alex checks attendees' responses as part of the event.

Caso Alex tenha compartilhado com Adele mas não tiver delegado seu calendário à ela:If Alex has shared and not delegated his calendar with Adele:

  • Conectado como Adele, um aplicativo pode obter o calendário que Alex compartilhou com Adele.Signed in as Adele, an app can get the calendar that Alex has shared with Adele.
  • O aplicativo pode usar as solicitações e respostas nas etapas 2 a 4 para aplicar ao calendário compartilhado da mesma maneira que ao calendário delegado.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.
  • Na etapa 5, o aplicativo pode entrar como Alex, em vez de Adele, para receber a mensagem de resposta do Clara.In step 5, the app can sign in as Alex, instead of Adele, to receive Christie's response message.

Etapa 1: Adele obtém o calendário delegadoStep 1: Adele gets the delegated calendar

Entre como Adele, obtenha os calendários a que ela tem acesso e identifique aquele que Alex delegou a ela, para usá-lo na próxima etapa para criar um evento no calendário.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

Observe que uma resposta bem-sucedida inclui o código de resposta HTTP 200, o principal calendário do Adele e uma cópia do calendário delegado por Alex na caixa de correio do Adele, com as seguintes propriedades: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 é falso porque Adele é somente uma representante e não a proprietária do calendário.canShare is false since Adele is only a delegate and not the calendar owner.
  • canEdit é verdadeiro, uma vez como representante, Adele tem acesso de gravação para eventos não privados no calendário delegado.canEdit is true since as delegate, Adele has write access to non-private events in the delegated calendar.
  • owner é Alex Wilber indicando que é o calendário de 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"
            }
        }
    ]
}

OBSERVAÇÃO Conectado como Adele, você pode, como alternativa, obter o calendário delegado diretamente da caixa de correio de Alex, especificando a identidade de Alex e o atalho de calendar, como em GET https://graph.microsoft.com/v1.0/users/AlexW@contoso.OnMicrosoft.com/calendar.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. A ID do calendário retornado corresponde apenas à caixa de correio de Alex.The returned calendar ID corresponds to only Alex' mailbox.

Etapa 2: Adele cria e envia um convite em nome de AlexStep 2: Adele creates and sends an invitation on Alex' behalf

Conectado como Adele, usa a ID de calendário obtida na etapa 1 para criar um evento no calendário delegado e envia para Clara e Sara, em nome de Alex: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"
    }
  ]
}

Observe que uma resposta bem-sucedida inclui HTTP 201 e as seguintes propriedades da instância event:Notice a successful response includes HTTP 201 and the following event properties:

  • isOrganizer é definido como verdadeiro.isOrganizer is set to true. Em geral, essa propriedade é verdadeira se o proprietário do calendário (Alex) é o organizador da reunião.In general, this property is true if the calendar owner (Alex) is the organizer of the meeting. Isso também se aplica se um representante (Adele) organizou o evento em nome do proprietário.This also applies if a delegate (Adele) organized the meeting on behalf of the owner.
  • A coleção attendees especifica Sara e Clara.The attendees collection specifies Megan and Christie.
  • A propriedadeorganizer está definido como Alex, uma vez que o convite foi enviado pela representante de Alex (Adele) no calendário principal de Alex.organizer is set to Alex, since the invitation was sent by Alex' delegate (Adele) in Alex' primary calendar.
  • Nem a instância participantes nem aorganizer especifica o representante (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"
        }
    }
}

Etapa 3: Clara recebe a solicitação de reunião e examina o evento associado no seu calendárioStep 3: Christie receives meeting request and inspects the associated event in her calendar

Ao entregar a solicitação de reunião, o Outlook cria automaticamente umeventonão confirmado no calendário de Clara.Upon delivering the meeting request, Outlook automatically creates a tentative event in Christie's calendar.

Conectado como Clara, obtenha o eventMessagee event que estão associados à solicitação de reunião da etapa 2: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

Observe que uma resposta bem-sucedida inclui o código de resposta HTTP 200 e as seguintes propriedades doeventMessage:Notice a successful response includes the response code HTTP 200 and the following eventMessage properties:

  • meetingMessageType especifica se essa mensagem é meetingRequest.meetingMessageType specifies this message is meetingRequest.
  • sender é Adele.sender is Adele.
  • from é Alex.from is Alex.
  • toRecipients incluem Sara e Clara.toRecipients include Megan and Christie.

E as seguintes propriedades da instância event:And the following event properties:

  • attendees incluem Alex, Sara e Clara.attendees include Alex, Megan, and Christie.
  • organizer é Alex.organizer is Alex.

A identidade de Adele é exibida somente na propriedadesender, da eventMessage e não no evento associado.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"
            }
        }
    }
}

Etapa 4: a Clara responde à solicitação de reuniãoStep 4: Christie responds to the meeting request

Conectada como Clara, define o evento como provisório e inclui uma mensagem na resposta: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
}

Uma resposta bem-sucedida retorna HTTP 202 Aceito.A successful response returns HTTP 202 Accepted.

HTTP/1.1 202 Accepted

Etapa 5: Adele recebe a mensagem de respostaStep 5: Adele receives the response message

Como Adele é uma representante do calendário principal de Alex, Adele recebe todas as respostas de reunião desse calendário em nome de Alex.Because Adele is a delegate of Alex' primary calendar, Adele receives all meeting responses for that calendar on Alex' behalf.

Conectada como Adele, obtem eventMessage que representa a resposta de Clara na etapa 4: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=

Observe que uma resposta bem-sucedida inclui HTTP 200 e as seguintes propriedades doeventMessage:Notice a successful response includes the response code HTTP 200 and the following eventMessage properties:

  • meetingMessageType é meetingTenativelyAccepted.meetingMessageType is meetingTenativelyAccepted.
  • de é Clara.from is Christie.
  • toRecipients inclui somente Adele, mas não o proprietário do calendário Alex.toRecipients includes only Adele, but not the calendar owner Alex. Isso ocorre porque Alex manteve o padrão para fazer o Outlook direcionar todas as respostas de reunião somente para delegados.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"
    }
}

Etapa 6: Alex acessa respostas como parte do eventoStep 6: Alex accesses responses as part of the event

Como Alex manteve o padrão de fazer com que o Outlook direcionasse todas as solicitações e respostas de reunião apenas para delegados, Alex não recebe a resposta de Clara da etapa 4.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. No entanto, ele pode obter a resposta por meio de evento no calendário principal.He can however get the response through the event in his primary calendar.

Conectado como Alex, obtem o evento que Adele criou na etapa 2 e obtem respostas da propriedade participantes: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=

Observe que uma resposta bem-sucedida inclui HTTP 200 e as seguintes propriedades doevent:Notice a successful response includes the response code HTTP 200 and the following event properties:

  • isOrganizer é verdadeiro.isOrganizer is true.
  • attendees incluem Sara e Clara.attendees include only Megan and Christie.
  • A propriedade status de cada instância participante indica qualquer resposta do participante:The status property of each attendee instance indicates any response from the attendee:
    • A resposta de Sara é none.Megan's response is none.
    • A resposta de Clara é tentativelyAccepted.Christie's response is tentativelyAccepted.
  • organizer é Alex.organizer is Alex.
  • Nenhuma propriedade no evento retornado indica a delegada, 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"
        }
    }
}

Próximas etapasNext steps

Saiba mais sobre:Find out more about: