One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Calendars.ReadWrite
Delegated (personal Microsoft account)
Calendars.ReadWrite
Application
Calendars.ReadWrite
HTTP request
POST /me/events/{id}/accept
POST /users/{id | userPrincipalName}/events/{id}/accept
POST /me/calendar/events/{id}/accept
POST /users/{id | userPrincipalName}/calendar/events/{id}/accept
POST /me/calendars/{id}/events/{id}/accept
POST /users/{id | userPrincipalName}/calendars/{id}/events/{id}/accept
POST /me/calendargroups/{id}/calendars/{id}/events/{id}/accept
POST /users/{id | userPrincipalName}/calendargroups/{id}/calendars/{id}/events/{id}/accept
Request headers
Name
Type
Description
Authorization
string
Bearer {token}. Required.
Content-Type
string
Nature of the data in the body of an entity. Required.
Request body
In the request body, provide a JSON object with the following parameters.
Parameter
Type
Description
comment
String
Text included in the response. Optional.
sendResponse
Boolean
true if a response is to be sent to the organizer; otherwise, false. Optional. Default is true.
Response
If successful, this method returns 202 Accepted response code. It does not return anything in the response body.
POST https://graph.microsoft.com/v1.0/me/events/{id}/accept
Content-type: application/json
{
"comment": "comment-value",
"sendResponse": true
}
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Me.Events.Item.Accept.AcceptPostRequestBody
{
Comment = "comment-value",
SendResponse = true,
};
await graphClient.Me.Events["{event-id}"].Accept.PostAsync(requestBody);
Import-Module Microsoft.Graph.Users.Actions
$params = @{
Comment = "comment-value"
SendResponse = $true
}
# A UPN can also be used as -UserId.
Invoke-MgAcceptUserEvent -UserId $userId -EventId $eventId -BodyParameter $params
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new AcceptPostRequestBody();
$requestBody->setComment('comment-value');
$requestBody->setSendResponse(true);
$graphServiceClient->me()->eventsById('event-id')->accept()->post($requestBody);