Philip Young
Philip Young

Reputation: 107

MS Graph Api - Group Membership Change Notification - Not receiving notification after User who is a Member is hard deleted

I am currently set up for Change Notifications at the individual Group resource level(/groups/{guid}), with changeType of (updated, deleted) and am acting on Group changes with a delta link, including membership changes. My delta link is doing a $select of displayName and members.

I've noticed during testing that, if a User is deleted from Graph who is a member of the Group, a Change Notification is not sent. After some research, I found that when the User is deleted, they are first soft deleted in Graph, and retain their group membership until permanently deleted (see the 'Some things to note' section here https://learn.microsoft.com/en-us/graph/delta-query-groups#deltalink-response)

However, when I permanently delete the User, I am still not getting any Change Notifications. I am just wondering if I am doing something wrong? I am correctly getting Membership updates on Users added or removed from the Group, and DisplayName changes as well. Or perhaps I have found a bug?

Upvotes: 0

Views: 1083

Answers (1)

Diana
Diana

Reputation: 718

From the question, I can see you are subscribed to group changes, which correctly sends change notifications when changes are made to the group or the group itself is deleted. I tested this and was able to receive this notification: enter image description here The issue in this case is that your application is not subscribed to Change Notifications at the individual User resource level /users which would send a change notification when the user is deleted. A few things to be aware of with regards to change notifications:

  • Certain limits apply to Azure AD based resources (users, groups) and will generate errors when exceeded
  • For users and groups, the maximum length of the subscription is 4230 minutes(under 3 days)

Please find further documentation here: creating a subscription

Upvotes: 1

Related Questions