Home

How do I get user_id and email in workspace from API?

%3CLINGO-SUB%20id%3D%22lingo-sub-871378%22%20slang%3D%22en-US%22%3EHow%20do%20I%20get%20user_id%20and%20email%20in%20workspace%20from%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871378%22%20slang%3D%22en-US%22%3E%3CP%3EI%20can%20get%20user's%20id%20in%20messages%20via%20API%20and%3C%2FP%3E%3CP%3EI%20can%20see%20email%20in%20APP%20(like%20in%20picture)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20email%20is%20not%20included%2C%3C%2FP%3E%3CP%3Eand%20I%20couldn't%20find%20any%20API%20to%20get%20user's%20id%20-%20email%20mapping.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edoes%20anyone%20knows%20how%20to%20get%20user's%20id%20-%20email%20mapping%3F%3C%2FP%3E%3CP%3E(like%20users.json%20in%20slack)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-871378%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-871595%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20user_id%20and%20email%20in%20workspace%20from%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871595%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F414009%22%20target%3D%22_blank%22%3E%40shunsuke%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20looking%20for%20the%20below%20API%20%3F%3A%3C%2FP%3E%3CPRE%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2FUserId%0A%0Ahttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2Fxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%3F%24select%3Dmail%3C%2FPRE%3E%3CP%3E--or---%3C%2FP%3E%3CPRE%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2Fusername%40domain.com%3F%24select%3Did%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-878570%22%20slang%3D%22en-US%22%3ERe%3A%20How%20do%20I%20get%20user_id%20and%20email%20in%20workspace%20from%20API%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-878570%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38365%22%20target%3D%22_blank%22%3E%40Kevin%20Morgan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20for%20your%20response.%3C%2FP%3E%3CP%3EI%20tried%20as%20you%20said.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewhat%20I%20want%20exactly%20is%20getting%20'aadObjectId'%20of%20Mentioned%20user%20ID%3C%2FP%3E%3CP%3Elike%20following%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%20%26nbsp%3B%20%26nbsp%3B%22from%22%3A%20%7B%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22id%22%3A%20%2229%3A*****%22%2C%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22name%22%3A%20%22****%22%2C%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22aadObjectId%22%3A%20%22********-****-****-****-************%22%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%7D%2C%3CBR%20%2F%3E...%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7B%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22mentioned%22%3A%20%7B%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22id%22%3A%20%22hoge%3A****%22%2C%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22name%22%3A%20%22****%22%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7D%2C%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22text%22%3A%20%22%3CAT%3E****%3C%2FAT%3E%22%2C%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%22type%22%3A%20%22mention%22%3CBR%20%2F%3E%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%7D%2C%3C%2FPRE%3E%3CP%3Ei%20want%20to%20get%20mentioned%20email%20or%26nbsp%3BaadObjectId%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I can get user's id in messages via API and

I can see email in APP (like in picture)

 

but email is not included,

and I couldn't find any API to get user's id - email mapping.

 

does anyone knows how to get user's id - email mapping?

(like users.json in slack)

2 Replies
Highlighted

@shunsuke 

 

Are you looking for the below API ?:

https://graph.microsoft.com/v1.0/users/UserId

https://graph.microsoft.com/v1.0/users/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?$select=mail

--or---

https://graph.microsoft.com/v1.0/users/username@domain.com?$select=id
Highlighted

@Kevin Morgan 

thank you for your response.

I tried as you said.

 

what I want exactly is getting 'aadObjectId' of Mentioned user ID

like following

 

    "from": {
       "id": "29:*****",
       "name": "****",
       "aadObjectId": "********-****-****-****-************"
   },
...
       {
           "mentioned": {
               "id": "hoge:****",
               "name": "****"
           },
           "text": "<at>****</at>",
           "type": "mention"
       },

i want to get mentioned email or aadObjectId

Related Conversations
InvalidOrMissingClaims
Gauddi in Yammer Developer on
0 Replies
[Suggestion] Let us change Skype Name
HotCakeX in Windows Insider Program on
0 Replies
MS Project - Impression GANTT + Ressources
Emmanuel57570 in Project on
1 Replies