Gettting active directory username ( sAMAccountName)

Copper Contributor

Hi 

 

Is there any way to get the active directory user name via API using the "aadObjectId" recevied the webhook . We can get the basic details using the API 3/conversations/19:ja0cu120i1jod12j@skype.net/members/labrown@fabrikam.com as mentioned here https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=json . I would like to get the username (sAMAccountName)  associated with  the "aadObjectId".

 

Thankyou for any help

 

Jijo John

2 Replies

Hi @jijojohn ,

 

Not sure if the following is of any use or just the Graph Documentation in general:

 

https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0

 

Thanks

 

Henry

@jijojohn 

 

In fact my last reply might not be valid if this is On Prem AD, but I will leave it out there in case.

 

Thanks

 

Henry