Hello @Lih Chen ,
To get user details, please refer to the below endpoint.
Get https://graph.microsoft.com/v1.0/users
To get Teams id of the users joined Teams please refer to the below endpoint.
GET /users/{id | user-principal-name}/joinedTeams
Please refer below documentation for more details:
https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http
https://learn.microsoft.com/en-us/graph/api/user-list-joinedteams?view=graph-rest-1.0&tabs=http
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.