Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Notifying group owners whenever a user is removed from said group (by user deletion and removal from group)

$
0
0

Hello,

I hope this is the correct section for my question.

I set up a Webhook with Python that is subscribed to an Azure group resource and gets notified whenever a change occurs in MS Graph.

Our goal is to be able to send Email notifications to group owners whenever a user gets added to the respective group or removed from it.

Everything works when you manually add or remove a user, but if you completelydelete the user account and thereby indirectly remove them from the group, neither a group audit log entry gets created, nor is any notification sent for the subscribed group resource.

My question is: What is the best way to achieve this? Do I have to use delta queries or do I have to subscribe to "/users", get a user deletion notification and then check the user's group memberships, pull the owners of all those groups and go from there?

Or maybe there even is a much simpler way?

Thank you for any help in this matter.


Viewing all articles
Browse latest Browse all 16000


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>