Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : CiIyViiPy1lIo8StK5cQL6
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Dataverse: How are users and teams linked with each other?

Like (0) ShareShare
ReportReport
Posted on 11 Dec 2022 17:26:02 by 53

Hello everyone

I need to make a FetchXml query that gets all the users that are a member of a specific team. But I don't understand how a user is linked with a team. I don't see any clear references from the User table (systemuser) to the Teams table. Neither entities have been altered.

When I look at the relations of the user entity, I see two relations that I do think may be it:

* Assign To Team/User

pastedimage1670777527376v1.png

* User <-> Team

pastedimage1670777594704v2.png

When I go and check the first relation, and go to the Rule Item table, I don't see any data there. I am logged in as a admin, so I should be able to see all data (I believe).
And I know there is a user in a team. 

pastedimage1670779082181v3.png

When I go and check the 2nd relation, I see it's a many-to-many relationship, but I am not sure how these are stored in Dataverse/Dynamics 365.
pastedimage1670779300320v4.png

Can someone point me in the right direction? I need to create a FetchXml query

I have not changed any relationships between both entities.

  • Junius01 Profile Picture
    53 on 12 Dec 2022 at 08:16:39
    RE: Dataverse: How are users and teams linked with each other?

    Thank you for the clear answer. This does help a lot!

  • Verified answer
    Eiken Profile Picture
    on 12 Dec 2022 at 05:13:10
    RE: Dataverse: How are users and teams linked with each other?

    Hi,

    There are following relationships between the User and Team.

    pastedimage1670821586902v1.png

    The first one “User-Team” is the second relationship you find.

    To create the Fetch XML, you can do the following steps.

       1.Advanced setting>Advanced Find

     pastedimage1670821855680v2.png

       2.query this relationship by Advanced Find.

     pastedimage1670821893995v3.png

        3.Download the Fetch XML

    pastedimage1670821946344v4.png

    I hope the following links will help you to create a Fetch Xml query.

    Querying Many to Many Relationships in Microsoft Dynamics CRM - CRM Software Blog | Dynamics 365

    Retrieval of Many-to-Many (N:N) Relationship Records using Web API in Dynamics 365 | Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

  • Verified answer
    Guido Preite Profile Picture
    54,077 Moderator on 11 Dec 2022 at 17:58:39
    RE: Dataverse: How are users and teams linked with each other?

    the second relationship (teammembership) is the one you need to use. Create the fetchxml query with FetchXML Builder for XrmToolBox, so you can test also the query and see the right results.

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.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,163 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,960 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans
Loading started