4

Graph API introduces a transitiveReports endpoint for users and contacts

 3 years ago
source link: https://www.michev.info/Blog/Post/3404/graph-api-introduces-a-transitivereports-endpoint-for-users-and-contacts
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

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:

and how it looks like inside Graph explorer:

While 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.

This entry was posted in Azure AD, Graph API. Bookmark the permalink.

Leave a Reply Cancel reply

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

Comment

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK