Notification of User Profile Picture update

Eric King 6 Reputation points
2019-10-31T15:30:58.423+00:00

Is there a way to trigger a notification when a User changes their Profile Photo in Exchange Online, SharePoint online, O365, etc. ? I'm not interested in other User profile changes, just specifically the Profile Photo. I am aware of the existence of [MS Graph webhooks][1], but they don't appear to be granular enough to limit the change notifications to Photo updates only. [1]: https://learn.microsoft.com/en-us/graph/webhooks

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,454 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. sampath mugada 11 Reputation points
    2019-10-31T16:25:28.263+00:00

    Hi , you are right I think there is no granular way to set notifications for only user photo change. But you may want to look at delta query to track user property changes and set an additional filter on "ProfilePhoto" field.

    https://learn.microsoft.com/en-us/graph/api/resources/profilephoto?view=graph-rest-1.0

    https://learn.microsoft.com/en-us/graph/delta-query-overview

    2 people found this answer helpful.

  2. Andrew Hickingbotham 1 Reputation point
    2021-03-04T22:47:37.527+00:00

    I needed this exact data and I believe I've found a solution. In the photo metadata there is a "@odata.mediaEtag" value that seems to be a unique identifier of the file. I haven't yet built the solution around it so there are unknowns but it looks promising.

    URL for photo metadata
    https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/photo

    Path for media eTag in result
    result.body.@odata.mediaEtag

    I don't believe there is a way to get the photo metadata for all users in one query but if there is I'd love to know about it.

    0 comments No comments