question

BharathaDeSilva-8071 avatar image
0 Votes"
BharathaDeSilva-8071 asked JorgeLeito-5722 commented

Error - Create peer-to-peer VoIP call with application hosted media

I'm making Graph API call to Create peer-to-peer VoIP call with application hosted media,
and I get below error.

Request: { "@odata.type": "#microsoft.graph.call", "callbackUri": "http://2631306c61e9.ngrok.io/xxxx/xxxxx/notification", "source": { "@odata.type": "#microsoft.graph.participantInfo", "identity": { "@odata.type": "#microsoft.graph.identitySet", "application": { "@odata.type": "#microsoft.graph.identity", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", "displayName": "<Full Name>" } } }, "targets": [ { "@odata.type": "#microsoft.graph.invitationParticipantInfo", "identity": { "@odata.type": "#microsoft.graph.identitySet", "user": { "@odata.type": "#microsoft.graph.identity", "displayName": "<Full Name>", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" } } } ], "requestedModalities": ["Audio"], "mediaConfig": { "@odata.type": "#microsoft.graph.serviceHostedMediaConfig" }, "tenantId": "xxxxxxx-xxxxx-????" }

Referred: https://docs.microsoft.com/en-us/graph/api/application-post-calls?view=graph-rest-1.0&tabs=http

Even for empty JSON body as below, I do get this error without raising any BadRequest error.

 POST /v1.0/communications/calls
    
 Content-Type: application/json
 Authorization: Bearer eyJ0eX????????
    
 {}


 {
   "error": {
     "code": "UnknownError",
     "message": "{\"errorCode\":\"7503\",\"message\":\"Application is not registered in our store.\",\"instanceAnnotations\":[]}",
     "innerError": {
       "date": "2020-09-21T07:47:35",
       "request-id": "db5022ae-94aa-48df-91fb-69171e38451c",
       "client-request-id": "db5022ae-94aa-48df-91fb-69171e38451c"
     }
   }
 }







office-teams-app-devazure-ad-graph
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@BharathaDeSilva-8071
Thanks for your post!

From your error message, can you make sure that your app has the correct permissions within the Azure Portal.

Application permissions: Calls.JoinGroupCallsasGuest.All, Calls.JoinGroupCalls.All, Calls.Initiate.All, Calls.InitiateGroupCalls.All
26156-apipermissions.jpg



If you have any other questions, please let me know.
Thank you for your time and patience!

Additional links:
Stack Exchange question

0 Votes 0 ·
apipermissions.jpg (77.3 KiB)

@JamesTran-MSFT

Thank you for your response!

Actually I had already added those permission ( Application Permission ) before.
Also I gone through all the stack-over-flow resolutions too, none of them helped me on this.

0 Votes 0 ·

@BharathaDeSilva-8071
Thanks for the quick reply.

I've added the Microsoft Teams tags to see if anyone from their side would be able to better assist. In the meantime, I'll reach out to my team to see if they have any suggestions.

If you have any other questions, please let me know.
Thank you for your time!

0 Votes 0 ·

FYI, I even decoded one of tokens I'm generating, it contains enough permissions.
Some fields are masked.
27896-decoded-token.png


0 Votes 0 ·
decoded-token.png (78.6 KiB)
PKC-8088 avatar image
2 Votes"
PKC-8088 answered JorgeLeito-5722 commented
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JamesTran-MSFT & @PKC-8088
I have resolved my error after the reply from @PKC-8088, and now it works.

I have now a scenario based question;

Is the call source identity e.i. caller always be a Bot?
Can it be on-behalf-of user?
My scenario is user-to-user calling scenario.
FYI : I'm implementing a Javascript client ( with java backend-end ) in our web site.
There we need calling between users.

actually I tried it, but i got below error

 {
     "error": {
       "code": "7507",
       "message": "Call source identity invalid.",
       "innerError": {
         "date": "2020-09-24T06:44:36",
         "request-id": "b418d209-e0b3-4261-a3b0-0e9b148b5822",
         "client-request-id": "b418d209-e0b3-4261-a3b0-0e9b148b5822"
       }
     }
   }

Thank you in-advance for your time!

0 Votes 0 ·

From what I read in https://docs.microsoft.com/en-us/graph/api/application-post-calls?view=graph-rest-1.0&tabs=http#permissions

Create Call can't be delegated, therefore can't use on behalf.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Not Supported

0 Votes 0 ·
JamesTran-MSFT avatar image
0 Votes"
JamesTran-MSFT answered SrenLund-3432 commented

@BharathaDeSilva-8071
I'm glad you were able to resolve your initial issue!

Looking into your question, Example 2 states - "a peer-to-peer call between the bot and the specified user". Additionally, at the top of the documentation it says - "Create call enables your bot to create a new outgoing peer-to-peer or group call..."


I've reached out to our engineering team for this and since this issue is a Teams related issue, I've added the correct tags. However, you might be able to get a faster response from our "Teams" team, by posting to their forum.

Thank you for your time!

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @BharathaDeSilva-8071
Did you ever get this to work as expected ? I have run into very similar issue. And have this post going

0 Votes 0 ·