Hi,
Thank you for posting the question to the Q&A forum.
If you want to use Microsoft Graph API to retrieve the contacts from Teams, please refer on the below link: https://video2.skills-academy.com/en-us/graph/api/user-list-contacts?view=graph-rest-1.0&tabs=http
All of the contacts on the user default can be checked from here:
Contacts folder:
GET https://graph.microsoft.com/v1.0/me/contacts
GET https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/contacts
Also, to get contacts in a specific folder in the user's mailbox use below API query:
GET https://graph.microsoft.com/v1.0/me/contactfolders/{Id}/contacts
GET https://graph.microsoft.com/v1.0/me/contactfolders/{Id}/contacts GET /users/{id |userPrincipalName}/contactfolders/{id}/contacts
I hope the above information can help you.
If the ANSWER is helpful, please click "Accept Answer" and upvote it. Thanks