Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Si l’événement autorise des propositions pour de nouvelles heures, lors de la réponse provisoire à l’événement, un invité peut choisir de suggérer une autre heure en incluant le paramètre proposedNewTime . Pour plus d’informations sur la façon de proposer une heure et sur la façon de recevoir et d’accepter une nouvelle proposition de temps, consultez Proposer de nouvelles heures de réunion.
POST /me/events/{id}/tentativelyAccept
POST /users/{id | userPrincipalName}/events/{id}/tentativelyAccept
POST /me/calendar/events/{id}/tentativelyAccept
POST /users/{id | userPrincipalName}/calendar/events/{id}/tentativelyAccept
POST /me/calendars/{id}/events/{id}/tentativelyAccept
POST /users/{id | userPrincipalName}/calendars/{id}/events/{id}/tentativelyAccept
POST /me/calendarGroups/{id}/calendars/{id}/events/{id}/tentativelyAccept
POST /users/{id | userPrincipalName}/calendarGroups/{id}/calendars/{id}/events/{id}/tentativelyAccept
En-têtes de demande
Nom
Type
Description
Autorisation
string
Porteur {token}. Obligatoire.
Content-Type
string
Nature des données dans le corps d’une entité. Obligatoire.
Corps de la demande
Dans le corps de la demande, indiquez un objet JSON avec les paramètres suivants.
Paramètre
Type
Description
comment
String
Texte inclus dans la réponse. Facultatif.
sendResponse
Booléen
true Si une réponse est envoyée à l’organisateur ; sinon false. Facultatif. La valeur par défaut est true.
Autre date/heure proposée par un invité pour le début et la fin d’une demande de réunion. Valide uniquement pour les événements qui autorisent de nouvelles propositions de temps. Pour définir ce paramètre, sendResponse doit être défini sur true. Facultatif.
Réponse
Si elle réussit, cette méthode renvoie un code de réponse 202 Accepted. Il ne retourne rien dans le corps de la réponse.
Cette action retourne HTTP 400 si l’un des éléments suivants se produit ou les deux :
Le paramètre proposedNewTime est inclus, mais la propriété allowNewTimeProposals de l’événement est false.
Le paramètre proposedNewTime est inclus, mais le paramètre sendResponse est défini sur false.
Exemple
Voici comment vous pouvez appeler cette API.
Demande
Dans l’exemple suivant, l’utilisateur connecté répond provisoirement à l’événement spécifié, définit le paramètre sendResponse sur true et inclut une autre heure dans le paramètre proposedNewTime .
POST https://graph.microsoft.com/beta/me/events/{id}/tentativelyAccept
Content-type: application/json
{
"comment": "I may not be able to make this week. How about next week?",
"sendResponse": true,
"proposedNewTime": {
"start": {
"dateTime": "2019-12-02T18:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2019-12-02T19:00:00",
"timeZone": "Pacific Standard Time"
}
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Me.Events.Item.TentativelyAccept;
using Microsoft.Graph.Beta.Models;
var requestBody = new TentativelyAcceptPostRequestBody
{
Comment = "I may not be able to make this week. How about next week?",
SendResponse = true,
ProposedNewTime = new TimeSlot
{
Start = new DateTimeTimeZone
{
DateTime = "2019-12-02T18:00:00",
TimeZone = "Pacific Standard Time",
},
End = new DateTimeTimeZone
{
DateTime = "2019-12-02T19:00:00",
TimeZone = "Pacific Standard Time",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Me.Events["{event-id}"].TentativelyAccept.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta users events tentatively-accept post --user-id {user-id} --event-id {event-id} --body '{\
"comment": "I may not be able to make this week. How about next week?",\
"sendResponse": true,\
"proposedNewTime": {\
"start": { \
"dateTime": "2019-12-02T18:00:00", \
"timeZone": "Pacific Standard Time" \
}, \
"end": { \
"dateTime": "2019-12-02T19:00:00", \
"timeZone": "Pacific Standard Time" \
} \
}\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.users.item.events.item.tentativelyaccept.TentativelyAcceptPostRequestBody tentativelyAcceptPostRequestBody = new com.microsoft.graph.beta.users.item.events.item.tentativelyaccept.TentativelyAcceptPostRequestBody();
tentativelyAcceptPostRequestBody.setComment("I may not be able to make this week. How about next week?");
tentativelyAcceptPostRequestBody.setSendResponse(true);
TimeSlot proposedNewTime = new TimeSlot();
DateTimeTimeZone start = new DateTimeTimeZone();
start.setDateTime("2019-12-02T18:00:00");
start.setTimeZone("Pacific Standard Time");
proposedNewTime.setStart(start);
DateTimeTimeZone end = new DateTimeTimeZone();
end.setDateTime("2019-12-02T19:00:00");
end.setTimeZone("Pacific Standard Time");
proposedNewTime.setEnd(end);
tentativelyAcceptPostRequestBody.setProposedNewTime(proposedNewTime);
graphClient.me().events().byEventId("{event-id}").tentativelyAccept().post(tentativelyAcceptPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const tentativelyAccept = {
comment: 'I may not be able to make this week. How about next week?',
sendResponse: true,
proposedNewTime: {
start: {
dateTime: '2019-12-02T18:00:00',
timeZone: 'Pacific Standard Time'
},
end: {
dateTime: '2019-12-02T19:00:00',
timeZone: 'Pacific Standard Time'
}
}
};
await client.api('/me/events/{id}/tentativelyAccept')
.version('beta')
.post(tentativelyAccept);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TentativelyAcceptPostRequestBody;
use Microsoft\Graph\Generated\Models\TimeSlot;
use Microsoft\Graph\Generated\Models\DateTimeTimeZone;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TentativelyAcceptPostRequestBody();
$requestBody->setComment('I may not be able to make this week. How about next week?');
$requestBody->setSendResponse(true);
$proposedNewTime = new TimeSlot();
$proposedNewTimeStart = new DateTimeTimeZone();
$proposedNewTimeStart->setDateTime('2019-12-02T18:00:00');
$proposedNewTimeStart->setTimeZone('Pacific Standard Time');
$proposedNewTime->setStart($proposedNewTimeStart);
$proposedNewTimeEnd = new DateTimeTimeZone();
$proposedNewTimeEnd->setDateTime('2019-12-02T19:00:00');
$proposedNewTimeEnd->setTimeZone('Pacific Standard Time');
$proposedNewTime->setEnd($proposedNewTimeEnd);
$requestBody->setProposedNewTime($proposedNewTime);
$graphServiceClient->me()->events()->byEventId('event-id')->tentativelyAccept()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Users.Actions
$params = @{
comment = "I may not be able to make this week. How about next week?"
sendResponse = $true
proposedNewTime = @{
start = @{
dateTime = "2019-12-02T18:00:00"
timeZone = "Pacific Standard Time"
}
end = @{
dateTime = "2019-12-02T19:00:00"
timeZone = "Pacific Standard Time"
}
}
}
# A UPN can also be used as -UserId.
Invoke-MgBetaAcceptUserEventTentatively -UserId $userId -EventId $eventId -BodyParameter $params
from msgraph import GraphServiceClient
from msgraph.generated.users.item.events.item.tentatively_accept.tentatively_accept_post_request_body import TentativelyAcceptPostRequestBody
from msgraph.generated.models.time_slot import TimeSlot
from msgraph.generated.models.date_time_time_zone import DateTimeTimeZone
graph_client = GraphServiceClient(credentials, scopes)
request_body = TentativelyAcceptPostRequestBody(
comment = "I may not be able to make this week. How about next week?",
send_response = True,
proposed_new_time = TimeSlot(
start = DateTimeTimeZone(
date_time = "2019-12-02T18:00:00",
time_zone = "Pacific Standard Time",
),
end = DateTimeTimeZone(
date_time = "2019-12-02T19:00:00",
time_zone = "Pacific Standard Time",
),
),
)
await graph_client.me.events.by_event_id('event-id').tentatively_accept.post(request_body)
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez https://aka.ms/ContentUserFeedback.