Graph API introduces a transitiveReports endpoint for users and contacts

After a long overdue vacation, I took a look at the Graph API changelog in order to catch up with any new developments. One of the things that caught my eye was the new transitiveReports endpoint, which should nicely complement the already available directReports and manager endpoints. The latter in particular can be used together with the $expand and $levels operators to provide a chain list of managers, or in other words a “transitive” list. Now, thanks to the transitiveReports endpoint, we can do the same in the opposite direction. Well, eventually.

Since this endpoint is only available in /beta currently, it’s functionality is a bit limited. In fact, all you can do currently is get the number of direct reports, and not the actual objects themselves. In other words, currently the only working query is one that includes the $count operator, in addition to the required ConsistencyLevel=’eventual’ header. Here’s an example query:$count

and how it looks like inside Graph explorer:

GraphTransitiveReportsWhile this might seem rather useless for the time being, my hope here is that we will eventually be able to run a similar query to get the full list of reports, hopefully by also specifying a level value, similarly to how the manager endpoint works. This in turn will allow for easy just-in-time querying of managerial relationships within the organization, without having to run repeated queries for each individual up/down the chain.

For additional information on the endpoint as well as any future updates, keep an eye on the official documentation.

UPDATE 03.2023: Unfortunately, it looks like Microsoft has pulled the plug on this and we can no longer use the $count operator :/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.