POST https://graph.microsoft.com/v1.0/communications/calls/{id}/subscribeToTone
Content-Type: application/json
Content-Length: 46
{
"clientContext": "fd1c7836-4d84-4e24-b6aa-23188688cc54"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Communications.Calls.Item.SubscribeToTone;
var requestBody = new SubscribeToTonePostRequestBody
{
ClientContext = "fd1c7836-4d84-4e24-b6aa-23188688cc54",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Communications.Calls["{call-id}"].SubscribeToTone.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc communications calls subscribe-to-tone post --call-id {call-id} --body '{\
"clientContext": "fd1c7836-4d84-4e24-b6aa-23188688cc54"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.communications.calls.item.subscribetotone.SubscribeToTonePostRequestBody subscribeToTonePostRequestBody = new com.microsoft.graph.communications.calls.item.subscribetotone.SubscribeToTonePostRequestBody();
subscribeToTonePostRequestBody.setClientContext("fd1c7836-4d84-4e24-b6aa-23188688cc54");
var result = graphClient.communications().calls().byCallId("{call-id}").subscribeToTone().post(subscribeToTonePostRequestBody);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\SubscribeToTonePostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SubscribeToTonePostRequestBody();
$requestBody->setClientContext('fd1c7836-4d84-4e24-b6aa-23188688cc54');
$result = $graphServiceClient->communications()->calls()->byCallId('call-id')->subscribeToTone()->post($requestBody)->wait();