Good morning guy.
I'm trying to create a voice call between two Teams users, just like Teams do.
This is the code I have.
var requestBody = new Call
{
OdataType = "#microsoft.graph.call",
CallbackUri = "https://bot.contoso.com/callback",
Targets = new List<InvitationParticipantInfo>
{
new InvitationParticipantInfo
{
OdataType = "#microsoft.graph.invitationParticipantInfo",
Identity = new IdentitySet
{
OdataType = "#microsoft.graph.identitySet",
User = new Identity
{
OdataType = "#microsoft.graph.identity",
DisplayName = response.DisplayName,
Id = response.Id,
},
},
},
},
RequestedModalities = new List<Modality?>
{
Modality.Audio,
},
CallOptions = new OutgoingCallOptions
{
OdataType = "#microsoft.graph.outgoingCallOptions",
IsContentSharingNotificationEnabled = true,
},
MediaConfig = new ServiceHostedMediaConfig
{
OdataType = "#microsoft.graph.serviceHostedMediaConfig",
},
};
var result = await graphClient.Communications.Calls.PostAsync(requestBody);
response is the object of the user I'm trying to call.
When I run this code, I got a Internal Server Error in the las sentence.
var result = await graphClient.Communications.Calls.PostAsync(requestBody);
The graphClient is good, I can create any other queries with it.
This are the permissions in my Azure APP
What I'm missing guys.
