SOLVED

Is it possible to get the external user's email in API Graph?

%3CLINGO-SUB%20id%3D%22lingo-sub-2910064%22%20slang%3D%22es-ES%22%3EIs%20it%20possible%20to%20get%20the%20external%20user's%20email%20in%20API%20Graph%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2910064%22%20slang%3D%22es-ES%22%3E%3CP%3E%3CSPAN%3EWe%20are%20using%20Calls%20Record%20from%20api%20graph%2C%20but%20in%20the%20response%20it%20shows%20an%20external%20user%2C%20is%20it%20possible%20to%20get%20the%20email%20of%20this%20type%20of%20user%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22%22%3EThank%20you%20very%20much%20in%20advance%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fcommunications%2FcallRecords%2F%7Bid%7D%3F%24expand%3Dsessions(%24expand%3Dsegments%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fcommunications%2FcallRecords%2F%7Bid%7D%3F%24expand%3Dsessions(%24expand%3Dsegments%3C%2FA%3E)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AngelicaEnriquez88_0-1635792260705.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F322426i9120B64D28B0F1AB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AngelicaEnriquez88_0-1635792260705.png%22%20alt%3D%22AngelicaEnriquez88_0-1635792260705.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2910064%22%20slang%3D%22es-ES%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2914510%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20get%20the%20external%20user's%20email%20in%20API%20Graph%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2914510%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F763346%22%20target%3D%22_blank%22%3E%40AngelicaEnriquez88%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIn%20teams%2C%20there's%20a%20difference%20between%20a%20guest%20user%20and%20an%20external%20user.%20A%20guest%20user%20is%20a%20user%20that%20someone%20has%20added%20to%20any%20team%20in%20your%20tenant%20and%20thus%20your%20azure%20ad%20tenant.%20An%20external%20user%20is%20a%20user%20already%20on%20teams%20or%20skype%20but%20not%20in%20your%20tenant%2C%20they%20are%20federated%20only%20and%20can%20only%20call%20and%20chat%2C%20cannot%20send%20files%20or%20join%20a%20team.%3CBR%20%2F%3EIn%20order%20to%20have%20a%20user%20in%20your%20azure%20ad%2C%20that%20user%20must%20be%20added%20to%20a%20team%20or%20manually%20added%20as%20a%20guest%20in%20your%20azure%20ad.%20If%20you%20just%20chat%20or%20call%20an%20external%20federated%20user%20without%20adding%20them%20to%20your%20tenant%2C%20it's%20simply%20an%20federated%20chat%2Fcall%20with%20no%20relation%20whatsoever%20with%20your%20tenant.%3CBR%20%2F%3EThrough%20graph%20API%20or%20any%20other%20means%20you%20won't%20be%20able%20to%20get%20very%20much%20information%20from%20those%20users%20that%20are%20externally%20federated%2C%20whereas%20you%20will%20be%20able%20to%20do%20basically%20full%20reporting%20on%20a%20guest%20users.%3CBR%20%2F%3EIf%20you%20want%20to%20retrieve%20all%20the%20external%20users%20inside%20your%20tenant%2C%20all%20you%20should%20do%20is%20user%20the%20following%20API%20call%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%3F%24filter%3DuserType%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%3F%24filter%3DuserType%3C%2FA%3E%26nbsp%3Beq%20%E2%80%98Guest%E2%80%99%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThanks%2C%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPrasad%20Das%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E-----------------------------------------------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIf%20the%20response%20is%20helpful%2C%20please%20click%20%22**Mark%20as%20Best%20Response**%22%20and%20like%20it.%20You%20can%20share%20your%20feedback%20via%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Faka.ms%2FDevSupportFeedback)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EMicrosoft%20Teams%20Developer%20Feedback%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Blink.%20Click%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Faka.ms%2FDevCommunityEscalationForm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3Ehere%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bto%20escalate.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

We are using Calls Record from api graph, but in the response it shows an external user, is it possible to get the email of this type of user?

 

Thank you very much in advance


https://graph.microsoft.com/v1.0/communications/callRecords/{id}?$expand=sessions($expand=segments)

AngelicaEnriquez88_0-1635792260705.png

 

1 Reply
best response confirmed by ChetanSharma-msft (Microsoft)
Solution

@AngelicaEnriquez88 

In teams, there's a difference between a guest user and an external user. A guest user is a user that someone has added to any team in your tenant and thus your azure ad tenant. An external user is a user already on teams or skype but not in your tenant, they are federated only and can only call and chat, cannot send files or join a team.
In order to have a user in your azure ad, that user must be added to a team or manually added as a guest in your azure ad. If you just chat or call an external federated user without adding them to your tenant, it's simply an federated chat/call with no relation whatsoever with your tenant.
Through graph API or any other means you won't be able to get very much information from those users that are externally federated, whereas you will be able to do basically full reporting on a guest users.
If you want to retrieve all the external users inside your tenant, all you should do is user the following API call: https://graph.microsoft.com/v1.0/users?$filter=userType eq ‘Guest’


Thanks, 

Prasad Das

-----------------------------------------------------------------------------------------------------

If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.