SOLVED

Unable to make audio call from Android Native App

%3CLINGO-SUB%20id%3D%22lingo-sub-1603825%22%20slang%3D%22en-US%22%3EUnable%20to%20make%20audio%20call%20from%20Android%20Native%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1603825%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%2C%3C%2FP%3E%3CDIV%3E%3CDIV%3EWe%20are%20using%20MsGraph%20SDK%20for%20android%2C%20from%20my%20Android%20application.%20I%20tried%20to%20authenticate%20using%20interactive%20login%20by%20passing%20scope%20parameters%20as%20below%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CDIV%3ECase%201%3A%20Delegate%20Permissions%20as%20Scope%20parameters%20to%20signin%3CBR%20%2F%3E%7B%20%22User.Read%22%2C%20%22Calendars.Read%22%20%7D%20-%20Authenticates%20Successfully%20and%20able%20to%20get%20the%20access%20token.%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CDIV%3ECase%202%3A%20Delegate%20and%20Application%20permissions%20as%20Scope%20parameters%20to%20signin%3CBR%20%2F%3E%7B%20%22User.Read%22%2C%20%22Calendars.Read%22%2C%20%22Calls.JoinGroupCallAsGuest%22%20%7D%20-%20Authenticatiom%20fails%20with%20following%20error%20message.%3CBR%20%2F%3Ecom.microsoft.identity.client.exception.MsalServiceException%3A%20invalid_client%3BAADSTS650053%3A%20The%20application%20'myTeamCommunication'%20asked%20for%20scope%20'Calls.JoinGroupCallAsGuest'%20that%20doesn't%20exist%20on%20the%20resource%20'00000003-0000-0000-c000-000000000000'.%20Contact%20the%20app%20vendor.%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CDIV%3ENote%3A%20I%20have%20grant%20consent%20to%20all%20the%20Delegate%20and%20Application%20permission%20from%20the%20Azure%20Active%20Directory%2FApi%20Permissions%20section.%3C%2FDIV%3E%3CDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CDIV%3EI%20need%20to%20be%20able%20to%20join%20the%20calls%2Fmeeting%20from%20my%20android%20application.%20Is%20it%20possible%20to%20access%20these%20permission%3F%20Kindly%20guide%20me%20if%20there%20is%20any%20other%20approach%20for%20the%20same.%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1607478%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20make%20audio%20call%20from%20Android%20Native%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1607478%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F715503%22%20target%3D%22_blank%22%3E%40ragup83%3C%2FA%3E%2C%26nbsp%3B%20Could%20you%20please%20confirm%20your%20access_token%20have%20the%20listed%20permission%20in%20roles%3F%20you%20can%20check%20it%20over%20%3CA%20href%3D%22https%3A%2F%2Fjwt.io%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ejwt.io.%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1612744%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20make%20audio%20call%20from%20Android%20Native%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1612744%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F715503%22%20target%3D%22_blank%22%3E%40ragup83%3C%2FA%3E%26nbsp%3BYou%20can't%20initiate%20a%20call%20with%20a%20user%20token.%20It's%20mandatory%20to%20make%20it%20with%20application%20permissions.%20You%20can%20create%20a%20web%20API%20that%20manage%20your%20calls%20and%20call%20the%20API%20from%20your%20android%20application.%20It%20also%20means%20that%20your%20call%20will%20be%20created%20with%20the%20bot%20identity.%20You%20need%20to%20manage%20redirection%20or%20transfer%20if%20you%20want%20to%20create%20a%20P2P%20call.%3C%2FP%3E%0A%3CP%3EThere%20is%20a%20specific%20SDK%20for%20that%20called%20Microsoft%20Graph%20Communications.%20You%20can%20find%20some%20documentation%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fbots%2Fcalls-and-meetings%2Fcalls-meetings-bots-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fbots%2Fcalls-and-meetings%2Fcalls-meetings-bots-overview%3C%2FA%3E%26nbsp%3Band%20also%20an%20example%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmicrosoft-graph-comms-samples%2Ftree%2Fmaster%2FSamples%2FV1.0Samples%2FRemoteMediaSamples%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmicrosoft-graph-comms-samples%2Ftree%2Fmaster%2FSamples%2FV1.0Samples%2FRemoteMediaSamples%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1612588%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20make%20audio%20call%20from%20Android%20Native%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1612588%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20configured%20the%20delegate%20and%20Application%20permission%20for%20the%20registered%20application%20in%20the%20ADS.%20I%20can%20see%20only%20the%20delegate%20permission%20but%20not%20Application%20permissions%20in%20the%20access%20token.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20able%20to%20authenticate%20and%20get%20an%20access%20token%20when%20I%20included%20the%20delegate%20permission%20in%20the%20scope%20list.%20If%20I%20add%20any%20Application%20permission%20in%20the%20scope%20list%20and%20call%20the%20SignIn%20method%20from%20Android%20application%20then%20it%20is%20failed.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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
Highlighted

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

Highlighted

@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.

Highlighted
Best Response confirmed by ragup83 (Occasional 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...