We have an Application Hosted Media Bot based upon the Bot Media Framework built in C#. This bot can perfectly setup a peer-to-peer call to a Teams user using the Cloud Communications API, but this same bot can't setup a peer-to-peer call to a Call Queue. No matter what we try, we always get the error response "7505, Request authorization tenant mismatch". This same Call Queue can be called from a Teams client without any problem.
There are some similar questions on other forms, but there is nowhere a clear answer if this scenario is supported or not.
What we have tried so far (based upon suggestion on forums and the examples in the documentation):
Creating an Application Instance for the bot (in the same tenant) and adding this in the ParticipantInfo of the Source property with the key 'applicationInstance'.
Assigning 'Microsoft 365 Phone System - Virtual User' license to this application instance.
Adding the Application Instance Id of the Call Queue (which is in the same tenant) in the InvitationParticipantInfo of the Targets property with the key 'applicationInstance'.
Assigning 'Microsoft 365 Phone System - Virtual User' to the call queue.
Adding the TenantId to the root of the Call object and every Identity.
Enabling/Disabling 'Conference mode' on the Call Queue.
The request body to the Graph API looks like the following (some information has been obfuscated):
{
"@odata.type": "#microsoft.graph.call",
"callbackUri": "https://****/api/calls",
"direction": "outgoing",
"mediaConfig": {
"@odata.type": "#microsoft.graph.appHostedMediaConfig",
"blob": "{\"mpUri\":\"****"}"
},
"requestedModalities": [
"audio",
"video"
],
"source": {
"@odata.type": "#microsoft.graph.participantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"application": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "(Identity: IoF5tQu/)",
"id": "<AppId of Bot>",
"tenantId": "<TenantId>"
},
"applicationInstance": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "(Identity: 0c0JkUYA)",
"id": "<Application Instance Id of Bot>",
"tenantId": "<TenantId>"
}
}
},
"subject": "(Generic: 6wI7rO4b)",
"targets": [
{
"@odata.type": "#microsoft.graph.invitationParticipantInfo",
"identity": {
"@odata.type": "#microsoft.graph.identitySet",
"applicationInstance": {
"@odata.type": "#microsoft.graph.identity",
"displayName": "(Identity: W00pQ5ZB)",
"id": "<Application Instance Id of Call Queue>",
"tenantId": "<TenantId>"
}
}
}
],
"tenantId": "tenantId": "<TenantId>"
}
A long introduction, but actually only two short questions:
Does the Graph API support calling a Call Queue from a Bot?
If so, what must be done to get this working?