Is there a way to retrieve the Id of users manager when calling the user delta query?

Aaron Milne 1 Reputation point
2022-11-28T11:34:27.377+00:00

I am using the user delta query to get a list of users and their properties that have updated over period of time. I require certain fields to be returned from the graph each time so that I can update database. For most of the fields I need this is not a problem, as I can use the $select property to do this. The only field I am having trouble with is the manager. I have managed to get the delta query to return this when the manager itself is updated, but I would like to have the manager id return even if some field other than manager changes.

I am aware of a method to get this using regular user query, using $expand=manager($select=id,displayName), but this doesn't seem to work on delta query and I don't want to have to call the API twice to get the manager id.

Here is how I am currently initialising the query.
264786-image.png

Any advice would be greatly appreciated!

Thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,493 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 36,651 Reputation points
    2022-11-29T10:14:21.023+00:00

    Hi @Aaron Milne

    When you call the /users/delta endpoint, an array of manager@delta is returned, which contains the object id of the user's manager.

    265167-page20.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.