User profile photo synchronization

Farmer, Jeremy 1 Reputation point
2022-10-10T12:53:36.143+00:00

Hi,

I am trying to synchronize users profile pictures to some external systems. Currently I know I can use https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http to get a list of users and then go to https://learn.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0 for every user in order to get their user profile photo information and do whatever I need to do with it from there.

I'm curious if there is a better way, is there any way for Graph to send a notification to us via an api call or something similar when a user has updated their profile image, so that we only download and update ones that have changed?

Thanks!

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

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 5,831 Reputation points
    2022-10-11T08:42:51.493+00:00

    Hi @Farmer, Jeremy , So far, you could subscribe to /users endpoint and receive a notification when user properties updated. However, it is not yet supported for user/photo endpoints.
    Please refer this documentation: https://learn.microsoft.com/en-us/graph/api/resources/webhooks?view=graph-rest-1.0
    Hope this helps, wish you all the best.

    249282-image.png
    249306-image.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.