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)
Not Supported
Delegated (personal Microsoft account)
Not Supported
Application
Calls.AccessMedia.All
Note: Any tone data provided may not be persisted. Make sure you are compliant with the laws and regulations of your area regarding data protection and confidentiality of communications. Please see the Terms of Use and consult with your legal counsel for more information.
HTTP request
POST /communications/calls/{id}/subscribeToTone
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Request body
In the request body, provide a JSON object with the following parameters.
Parameter
Type
Description
clientContext
String
Unique client context string. Can have a maximum of 256 characters.
Response
If successful, this method returns 200 OK response code.
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
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Communications.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody
{
ClientContext = "fd1c7836-4d84-4e24-b6aa-23188688cc54",
};
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"\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$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();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = SubscribeToTonePostRequestBody(
client_context = "fd1c7836-4d84-4e24-b6aa-23188688cc54",
)
result = await graph_client.communications.calls.by_call_id('call-id').subscribe_to_tone.post(body = request_body)