APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Transfer an active peer-to-peer call or group call.
Note: This is only supported if both the transferee and transfer target are Microsoft Teams users that belong to the same tenant. Transfer to PSTN number is supported only for application instance. To learn more about transferor, transferee and transfer target, see RFC 5589.
A consultative transfer means that the transferor can inform the person they want to transfer the call to (the transferee), before the transfer is made. This is opposed to transfering the call directly.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
Not supported.
Not supported.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Calls.Initiate.All
Not available.
HTTP request
POST /app/calls/{id}/transfer
POST /communications/calls/{id}/transfer
Note: The /app path is deprecated. Going forward, use the /communications path.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Beta.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
EndpointType = EndpointType.Default,
Identity = new IdentitySet
{
User = new Identity
{
Id = "550fae72-d251-43ec-868c-373732c2704f",
DisplayName = "Heidi Steen",
AdditionalData = new Dictionary<string, object>
{
{
"tenantId" , "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
},
},
},
AdditionalData = new Dictionary<string, object>
{
{
"languageId" , "languageId-value"
},
{
"region" , "region-value"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls transfer post --call-id {call-id} --body '{\
"transferTarget": {\
"endpointType": "default",\
"identity": {\
"user": {\
"id": "550fae72-d251-43ec-868c-373732c2704f",\
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",\
"displayName": "Heidi Steen"\
}\
},\
"languageId": "languageId-value",\
"region": "region-value"\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
transferTarget.setEndpointType(EndpointType.Default);
IdentitySet identity = new IdentitySet();
Identity user = new Identity();
user.setId("550fae72-d251-43ec-868c-373732c2704f");
user.setDisplayName("Heidi Steen");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("tenantId", "72f988bf-86f1-41af-91ab-2d7cd011db47");
user.setAdditionalData(additionalData);
identity.setUser(user);
transferTarget.setIdentity(identity);
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("languageId", "languageId-value");
additionalData1.put("region", "region-value");
transferTarget.setAdditionalData(additionalData1);
transferPostRequestBody.setTransferTarget(transferTarget);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TransferPostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TransferPostRequestBody();
$transferTarget = new InvitationParticipantInfo();
$transferTarget->setEndpointType(new EndpointType('default'));
$transferTargetIdentity = new IdentitySet();
$transferTargetIdentityUser = new Identity();
$transferTargetIdentityUser->setId('550fae72-d251-43ec-868c-373732c2704f');
$transferTargetIdentityUser->setDisplayName('Heidi Steen');
$additionalData = [
'tenantId' => '72f988bf-86f1-41af-91ab-2d7cd011db47',
];
$transferTargetIdentityUser->setAdditionalData($additionalData);
$transferTargetIdentity->setUser($transferTargetIdentityUser);
$transferTarget->setIdentity($transferTargetIdentity);
$additionalData = [
'languageId' => 'languageId-value',
'region' => 'region-value',
];
$transferTarget->setAdditionalData($additionalData);
$requestBody->setTransferTarget($transferTarget);
$graphServiceClient->communications()->calls()->byCallId('call-id')->transfer()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
from msgraph import GraphServiceClient
from msgraph.generated.models.transfer_post_request_body import TransferPostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
graph_client = GraphServiceClient(credentials, scopes)
request_body = TransferPostRequestBody(
transfer_target = InvitationParticipantInfo(
endpoint_type = EndpointType.Default,
identity = IdentitySet(
user = Identity(
id = "550fae72-d251-43ec-868c-373732c2704f",
display_name = "Heidi Steen",
additional_data = {
"tenant_id" : "72f988bf-86f1-41af-91ab-2d7cd011db47",
}
),
),
additional_data = {
"language_id" : "languageId-value",
"region" : "region-value",
}
),
)
await graph_client.communications.calls.by_call_id('call-id').transfer.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Beta.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
EndpointType = EndpointType.Default,
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "550fae72-d251-43ec-868c-373732c2704f",
DisplayName = "Heidi Steen",
AdditionalData = new Dictionary<string, object>
{
{
"tenantId" , "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
},
},
},
ReplacesCallId = "e5d39592-99bd-4db8-bca8-30fb894ec51d",
AdditionalData = new Dictionary<string, object>
{
{
"languageId" , "en-us"
},
{
"region" , "amer"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls transfer post --call-id {call-id} --body '{\
"transferTarget": {\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"endpointType": "default",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"user": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "550fae72-d251-43ec-868c-373732c2704f",\
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",\
"displayName": "Heidi Steen"\
}\
},\
"languageId": "en-us",\
"region": "amer",\
"replacesCallId": "e5d39592-99bd-4db8-bca8-30fb894ec51d"\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
transferTarget.setOdataType("#microsoft.graph.invitationParticipantInfo");
transferTarget.setEndpointType(EndpointType.Default);
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
Identity user = new Identity();
user.setOdataType("#microsoft.graph.identity");
user.setId("550fae72-d251-43ec-868c-373732c2704f");
user.setDisplayName("Heidi Steen");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("tenantId", "72f988bf-86f1-41af-91ab-2d7cd011db47");
user.setAdditionalData(additionalData);
identity.setUser(user);
transferTarget.setIdentity(identity);
transferTarget.setReplacesCallId("e5d39592-99bd-4db8-bca8-30fb894ec51d");
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("languageId", "en-us");
additionalData1.put("region", "amer");
transferTarget.setAdditionalData(additionalData1);
transferPostRequestBody.setTransferTarget(transferTarget);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TransferPostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TransferPostRequestBody();
$transferTarget = new InvitationParticipantInfo();
$transferTarget->setOdataType('#microsoft.graph.invitationParticipantInfo');
$transferTarget->setEndpointType(new EndpointType('default'));
$transferTargetIdentity = new IdentitySet();
$transferTargetIdentity->setOdataType('#microsoft.graph.identitySet');
$transferTargetIdentityUser = new Identity();
$transferTargetIdentityUser->setOdataType('#microsoft.graph.identity');
$transferTargetIdentityUser->setId('550fae72-d251-43ec-868c-373732c2704f');
$transferTargetIdentityUser->setDisplayName('Heidi Steen');
$additionalData = [
'tenantId' => '72f988bf-86f1-41af-91ab-2d7cd011db47',
];
$transferTargetIdentityUser->setAdditionalData($additionalData);
$transferTargetIdentity->setUser($transferTargetIdentityUser);
$transferTarget->setIdentity($transferTargetIdentity);
$transferTarget->setReplacesCallId('e5d39592-99bd-4db8-bca8-30fb894ec51d');
$additionalData = [
'languageId' => 'en-us',
'region' => 'amer',
];
$transferTarget->setAdditionalData($additionalData);
$requestBody->setTransferTarget($transferTarget);
$graphServiceClient->communications()->calls()->byCallId('call-id')->transfer()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Beta.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
EndpointType = EndpointType.Default,
Identity = new IdentitySet
{
AdditionalData = new Dictionary<string, object>
{
{
"phone" , new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "+12345678901",
}
},
},
},
AdditionalData = new Dictionary<string, object>
{
{
"languageId" , "languageId-value"
},
{
"region" , "region-value"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls transfer post --call-id {call-id} --body '{\
"transferTarget": {\
"endpointType": "default",\
"identity": {\
"phone": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "+12345678901"\
}\
},\
"languageId": "languageId-value",\
"region": "region-value"\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
transferTarget.setEndpointType(EndpointType.Default);
IdentitySet identity = new IdentitySet();
HashMap<String, Object> additionalData = new HashMap<String, Object>();
Identity phone = new Identity();
phone.setOdataType("#microsoft.graph.identity");
phone.setId("+12345678901");
additionalData.put("phone", phone);
identity.setAdditionalData(additionalData);
transferTarget.setIdentity(identity);
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("languageId", "languageId-value");
additionalData1.put("region", "region-value");
transferTarget.setAdditionalData(additionalData1);
transferPostRequestBody.setTransferTarget(transferTarget);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TransferPostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TransferPostRequestBody();
$transferTarget = new InvitationParticipantInfo();
$transferTarget->setEndpointType(new EndpointType('default'));
$transferTargetIdentity = new IdentitySet();
$additionalData = [
'phone' => [
'@odata.type' => '#microsoft.graph.identity',
'id' => '+12345678901',
],
];
$transferTargetIdentity->setAdditionalData($additionalData);
$transferTarget->setIdentity($transferTargetIdentity);
$additionalData = [
'languageId' => 'languageId-value',
'region' => 'region-value',
];
$transferTarget->setAdditionalData($additionalData);
$requestBody->setTransferTarget($transferTarget);
$graphServiceClient->communications()->calls()->byCallId('call-id')->transfer()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Beta.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
EndpointType = EndpointType.Default,
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
AdditionalData = new Dictionary<string, object>
{
{
"phone" , new Identity
{
OdataType = "#microsoft.graph.identity",
Id = "+12345678901",
}
},
},
},
ReplacesCallId = "e5d39592-99bd-4db8-bca8-30fb894ec51d",
AdditionalData = new Dictionary<string, object>
{
{
"languageId" , "en-us"
},
{
"region" , "amer"
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls transfer post --call-id {call-id} --body '{\
"transferTarget": {\
"@odata.type": "#microsoft.graph.invitationParticipantInfo",\
"endpointType": "default",\
"identity": {\
"@odata.type": "#microsoft.graph.identitySet",\
"phone": {\
"@odata.type": "#microsoft.graph.identity",\
"id": "+12345678901"\
}\
},\
"languageId": "en-us",\
"region": "amer",\
"replacesCallId": "e5d39592-99bd-4db8-bca8-30fb894ec51d"\
}\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
transferTarget.setOdataType("#microsoft.graph.invitationParticipantInfo");
transferTarget.setEndpointType(EndpointType.Default);
IdentitySet identity = new IdentitySet();
identity.setOdataType("#microsoft.graph.identitySet");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
Identity phone = new Identity();
phone.setOdataType("#microsoft.graph.identity");
phone.setId("+12345678901");
additionalData.put("phone", phone);
identity.setAdditionalData(additionalData);
transferTarget.setIdentity(identity);
transferTarget.setReplacesCallId("e5d39592-99bd-4db8-bca8-30fb894ec51d");
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("languageId", "en-us");
additionalData1.put("region", "amer");
transferTarget.setAdditionalData(additionalData1);
transferPostRequestBody.setTransferTarget(transferTarget);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TransferPostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TransferPostRequestBody();
$transferTarget = new InvitationParticipantInfo();
$transferTarget->setOdataType('#microsoft.graph.invitationParticipantInfo');
$transferTarget->setEndpointType(new EndpointType('default'));
$transferTargetIdentity = new IdentitySet();
$transferTargetIdentity->setOdataType('#microsoft.graph.identitySet');
$additionalData = [
'phone' => [
'@odata.type' => '#microsoft.graph.identity',
'id' => '+12345678901',
],
];
$transferTargetIdentity->setAdditionalData($additionalData);
$transferTarget->setIdentity($transferTargetIdentity);
$transferTarget->setReplacesCallId('e5d39592-99bd-4db8-bca8-30fb894ec51d');
$additionalData = [
'languageId' => 'en-us',
'region' => 'amer',
];
$transferTarget->setAdditionalData($additionalData);
$requestBody->setTransferTarget($transferTarget);
$graphServiceClient->communications()->calls()->byCallId('call-id')->transfer()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Note: To transfer from a group call, the transferee parameter is required. All other parameters are the same as those for a transfer from a peer-to-peer call. A consultative transfer from a group call or a transfer to PSTN from a group call are similar to examples 1-4, with the transferee parameter specified.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Communications.Calls.Item.Transfer;
using Microsoft.Graph.Beta.Models;
var requestBody = new TransferPostRequestBody
{
TransferTarget = new InvitationParticipantInfo
{
EndpointType = EndpointType.Default,
Identity = new IdentitySet
{
User = new Identity
{
Id = "550fae72-d251-43ec-868c-373732c2704f",
DisplayName = "Heidi Steen",
AdditionalData = new Dictionary<string, object>
{
{
"tenantId" , "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
},
},
},
},
Transferee = new ParticipantInfo
{
Identity = new IdentitySet
{
User = new Identity
{
Id = "751f6800-3180-414d-bd94-333364659951",
AdditionalData = new Dictionary<string, object>
{
{
"tenantId" , "72f988bf-86f1-41af-91ab-2d7cd011db47"
},
},
},
},
ParticipantId = "909c6581-5130-43e9-88f3-fcb3582cde37",
},
AdditionalData = new Dictionary<string, object>
{
{
"languageId" , "languageId-value"
},
{
"region" , "region-value"
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Communications.Calls["{call-id}"].Transfer.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc-beta communications calls transfer post --call-id {call-id} --body '{\
"transferTarget": {\
"endpointType": "default",\
"identity": {\
"user": {\
"id": "550fae72-d251-43ec-868c-373732c2704f",\
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",\
"displayName": "Heidi Steen"\
}\
},\
},\
"transferee": {\
"identity": {\
"user": {\
"id": "751f6800-3180-414d-bd94-333364659951",\
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47"\
}\
},\
"participantId": "909c6581-5130-43e9-88f3-fcb3582cde37"\
},\
"languageId": "languageId-value",\
"region": "region-value"\
}\
'
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody transferPostRequestBody = new com.microsoft.graph.beta.communications.calls.item.transfer.TransferPostRequestBody();
InvitationParticipantInfo transferTarget = new InvitationParticipantInfo();
transferTarget.setEndpointType(EndpointType.Default);
IdentitySet identity = new IdentitySet();
Identity user = new Identity();
user.setId("550fae72-d251-43ec-868c-373732c2704f");
user.setDisplayName("Heidi Steen");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("tenantId", "72f988bf-86f1-41af-91ab-2d7cd011db47");
user.setAdditionalData(additionalData);
identity.setUser(user);
transferTarget.setIdentity(identity);
transferPostRequestBody.setTransferTarget(transferTarget);
ParticipantInfo transferee = new ParticipantInfo();
IdentitySet identity1 = new IdentitySet();
Identity user1 = new Identity();
user1.setId("751f6800-3180-414d-bd94-333364659951");
HashMap<String, Object> additionalData1 = new HashMap<String, Object>();
additionalData1.put("tenantId", "72f988bf-86f1-41af-91ab-2d7cd011db47");
user1.setAdditionalData(additionalData1);
identity1.setUser(user1);
transferee.setIdentity(identity1);
transferee.setParticipantId("909c6581-5130-43e9-88f3-fcb3582cde37");
transferPostRequestBody.setTransferee(transferee);
HashMap<String, Object> additionalData2 = new HashMap<String, Object>();
additionalData2.put("languageId", "languageId-value");
additionalData2.put("region", "region-value");
transferPostRequestBody.setAdditionalData(additionalData2);
graphClient.communications().calls().byCallId("{call-id}").transfer().post(transferPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\TransferPostRequestBody;
use Microsoft\Graph\Generated\Models\InvitationParticipantInfo;
use Microsoft\Graph\Generated\Models\IdentitySet;
use Microsoft\Graph\Generated\Models\Identity;
use Microsoft\Graph\Generated\Models\ParticipantInfo;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TransferPostRequestBody();
$transferTarget = new InvitationParticipantInfo();
$transferTarget->setEndpointType(new EndpointType('default'));
$transferTargetIdentity = new IdentitySet();
$transferTargetIdentityUser = new Identity();
$transferTargetIdentityUser->setId('550fae72-d251-43ec-868c-373732c2704f');
$transferTargetIdentityUser->setDisplayName('Heidi Steen');
$additionalData = [
'tenantId' => '72f988bf-86f1-41af-91ab-2d7cd011db47',
];
$transferTargetIdentityUser->setAdditionalData($additionalData);
$transferTargetIdentity->setUser($transferTargetIdentityUser);
$transferTarget->setIdentity($transferTargetIdentity);
$requestBody->setTransferTarget($transferTarget);
$transferee = new ParticipantInfo();
$transfereeIdentity = new IdentitySet();
$transfereeIdentityUser = new Identity();
$transfereeIdentityUser->setId('751f6800-3180-414d-bd94-333364659951');
$additionalData = [
'tenantId' => '72f988bf-86f1-41af-91ab-2d7cd011db47',
];
$transfereeIdentityUser->setAdditionalData($additionalData);
$transfereeIdentity->setUser($transfereeIdentityUser);
$transferee->setIdentity($transfereeIdentity);
$transferee->setParticipantId('909c6581-5130-43e9-88f3-fcb3582cde37');
$requestBody->setTransferee($transferee);
$additionalData = [
'languageId' => 'languageId-value',
'region' => 'region-value',
];
$requestBody->setAdditionalData($additionalData);
$graphServiceClient->communications()->calls()->byCallId('call-id')->transfer()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
from msgraph import GraphServiceClient
from msgraph.generated.models.transfer_post_request_body import TransferPostRequestBody
from msgraph.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph.generated.models.identity_set import IdentitySet
from msgraph.generated.models.identity import Identity
from msgraph.generated.models.participant_info import ParticipantInfo
graph_client = GraphServiceClient(credentials, scopes)
request_body = TransferPostRequestBody(
transfer_target = InvitationParticipantInfo(
endpoint_type = EndpointType.Default,
identity = IdentitySet(
user = Identity(
id = "550fae72-d251-43ec-868c-373732c2704f",
display_name = "Heidi Steen",
additional_data = {
"tenant_id" : "72f988bf-86f1-41af-91ab-2d7cd011db47",
}
),
),
),
transferee = ParticipantInfo(
identity = IdentitySet(
user = Identity(
id = "751f6800-3180-414d-bd94-333364659951",
additional_data = {
"tenant_id" : "72f988bf-86f1-41af-91ab-2d7cd011db47",
}
),
),
participant_id = "909c6581-5130-43e9-88f3-fcb3582cde37",
),
additional_data = {
"language_id" : "languageId-value",
"region" : "region-value",
}
)
await graph_client.communications.calls.by_call_id('call-id').transfer.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.