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 .
Transférez un appel d’égal à égal ou un appel de groupe actif.
Note: Cela n’est pris en charge que si le destinataire du transfert et la cible de transfert sont des utilisateurs Microsoft Teams qui appartiennent au même locataire. Le transfert vers un numéro RTC est pris en charge uniquement pour les instance d’application. Pour en savoir plus sur le transfert, le destinataire et la cible de transfert, consultez RFC 5589.
Un transfert consultatif signifie que le cédant peut informer la personne à laquelle il souhaite transférer l’appel (le destinataire du transfert), avant que le transfert ne soit effectué. Cela s’oppose au transfert direct de l’appel.
// 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);
// 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);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.communications.calls.item.transfer.transfer_post_request_body import TransferPostRequestBody
from msgraph_beta.generated.models.invitation_participant_info import InvitationParticipantInfo
from msgraph_beta.generated.models.endpoint_type import EndpointType
from msgraph_beta.generated.models.identity_set import IdentitySet
from msgraph_beta.generated.models.identity import Identity
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
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)
// 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);
// 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);
// 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);
// 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);
// 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);
// 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);
Exemple 5 : transfert d’appel à partir d’un appel de groupe
Note: Pour transférer à partir d’un appel de groupe, le paramètre transféré est requis. Tous les autres paramètres sont identiques à ceux d’un transfert à partir d’un appel d’égal à égal. Un transfert consultatif à partir d’un appel de groupe ou un transfert vers RTC à partir d’un appel de groupe sont similaires aux exemples 1 à 4, avec le paramètre transféré spécifié.
// 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);
// 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);