Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

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

Posted on by 45

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
    Junius01 45 on at
    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
    Eiken on at
    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
    Guido Preite 54,081 Super User 2024 Season 1 on at
    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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,988 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,656 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans