Hi all,
I'm new to dynamics and this is my first go at using JavaScript with Xrm.WebApi class.
I'm trying to find if a user is within a team.
I grab the user ID
Hi all,
I'm new to dynamics and this is my first go at using JavaScript with Xrm.WebApi class.
I'm trying to find if a user is within a team.
I grab the user ID
Thanks Andrew
Hi Darren
1. User and Teams is kind of N:N relationship , which means : A user can belongs to multiple teams , and a team can have multiple users as well. That explains why 3 teams returned when you query a single user ID.
2. If you want to check if one specific user belongs to a specific team, you need to apply extra filter saying teamid eq <team GUID>.
Here is the web API you can get all users&teams records:
https://<yourdomain>.crm*.dynamics.com/api/data/v9.0/teammemberships
Hello,
I would recommend to use retrieveRecord of systemuser entity based on UserID with expansion on teammembership.
Also you can use FetchXml approach instead approach you used.
André Arnaud de Cal...
294,137
Super User 2025 Season 1
Martin Dráb
232,879
Most Valuable Professional
nmaenpaa
101,158
Moderator