web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Query OrgChart data using WebAPI

(3) ShareShare
ReportReport
Posted on by 16
I'm trying to query OrgChart (Contacts Manager and Direct Reports) data using the WebAPI. I see the entity "msdyn_orgchartnode" where I can get the Contacts and their Accounts. And I see the N:N relationship called "contact_msdyn_orgchartnode_msdyn_noderecord" with the connection to the child Contacts. How can I create a Fetch/OData query to retrieve these records?
 
Screenshot showing direct reports in an org chart hierarchy.
Categories:
I have the same question (0)
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    2,375 Most Valuable Professional on at
    To retrieve OrgChart data (Contacts with their Direct Reports) via Web API, use the msdyn_orgchartnode entity and expand the N:N relationship contact_msdyn_orgchartnode_msdyn_noderecord.
    GET /api/data/v9.2/msdyn_orgchartnodes?$expand=contact_msdyn_orgchartnode_msdyn_noderecord($select=fullname,contactid)&$select=msdyn_name,msdyn_OrgChartNodeId
    

    This query returns OrgChart nodes with their related child contacts (direct reports).

     

    Note: The N:N relationship must be correctly configured and populated. If no data is returned, verify associations via Advanced Find or the relationship mappings.

     
  • Suggested answer
    Hamza H Profile Picture
    1,826 Super User 2026 Season 1 on at
    To retrieve OrgChart data (contacts and their direct reports) via Web API, query the msdyn_orgchartnode entity and expand the N:N relationship contact_msdyn_orgchartnode_msdyn_noderecord:
    GET /api/data/v9.2/msdyn_orgchartnodes?
      $select=msdyn_name,msdyn_OrgChartNodeId&
      $expand=contact_msdyn_orgchartnode_msdyn_noderecord($select=fullname,contactid)

    This returns OrgChart nodes along with their related child contacts (direct reports).

    Note: Ensure the N:N relationship is properly configured and populated. If no results appear, verify the associations using Advanced Find or relationship mappings.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 162 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 134

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 55 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans