Notifications
Announcements
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 21 Super User 2025 Season 2
TAHER Mehdi 14
LightningStrikes 9