Announcements
No record found.
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
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.
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
Thanks Andrew
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
NeerajPawar 31
Tom_Gioielli 19 Super User 2026 Season 1
11manish 18