Reputation: 1234
I'm trying to work with the Microsoft Teams JavaScript Library, and I've noticed in the documentation that there's a callback called teams.fullTrust.joinedTeams.getUserJoinedTeams for retrieving user joined teams.
However, when I inspected context.teams in the Teams JavaScript library, I couldn't find a built-in function to retrieve user joined teams. Is there a built-in function or an alternative approach to achieve this?
Upvotes: 0
Views: 125
Reputation: 69
you can achieve this by using the Microsoft Graph API. Microsoft Graph API provides two HTTP GET methods to retrieve the teams that a user is a part of:
GET /me/joinedTeams
GET /users/{id | user-principal-name}/joinedTeams
These methods return a list of team resources that the user is a part of
Upvotes: 0