SOLVED

Unable to make audio call from Android Native App

Copper Contributor

Hi ,

We are using MsGraph SDK for android, from my Android application. I tried to authenticate using interactive login by passing scope parameters as below
 
Case 1: Delegate Permissions as Scope parameters to signin
{ "User.Read", "Calendars.Read" } - Authenticates Successfully and able to get the access token.
 
Case 2: Delegate and Application permissions as Scope parameters to signin
{ "User.Read", "Calendars.Read", "Calls.JoinGroupCallAsGuest" } - Authenticatiom fails with following error message.
com.microsoft.identity.client.exception.MsalServiceException: invalid_client;AADSTS650053: The application 'myTeamCommunication' asked for scope 'Calls.JoinGroupCallAsGuest' that doesn't exist on the resource '00000003-0000-0000-c000-000000000000'. Contact the app vendor.
 
Note: I have grant consent to all the Delegate and Application permission from the Azure Active Directory/Api Permissions section.
 
I need to be able to join the calls/meeting from my android application. Is it possible to access these permission? Kindly guide me if there is any other approach for the same.
3 Replies

@ragup83,  Could you please confirm your access_token have the listed permission in roles? you can check it over jwt.io.

@Trinetra-MSFT 

I have configured the delegate and Application permission for the registered application in the ADS. I can see only the delegate permission but not Application permissions in the access token.

 

I am able to authenticate and get an access token when I included the delegate permission in the scope list. If I add any Application permission in the scope list and call the SignIn method from Android application then it is failed.

best response confirmed by ragup83 (Copper Contributor)
Solution

@ragup83 You can't initiate a call with a user token. It's mandatory to make it with application permissions. You can create a web API that manage your calls and call the API from your android application. It also means that your call will be created with the bot identity. You need to manage redirection or transfer if you want to create a P2P call.

There is a specific SDK for that called Microsoft Graph Communications. You can find some documentation here https://docs.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/calls-meetings-bots... and also an example here https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/Remo...

 

1 best response

Accepted Solutions
best response confirmed by ragup83 (Copper Contributor)
Solution

@ragup83 You can't initiate a call with a user token. It's mandatory to make it with application permissions. You can create a web API that manage your calls and call the API from your android application. It also means that your call will be created with the bot identity. You need to manage redirection or transfer if you want to create a P2P call.

There is a specific SDK for that called Microsoft Graph Communications. You can find some documentation here https://docs.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/calls-meetings-bots... and also an example here https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/V1.0Samples/Remo...

 

View solution in original post