Catch events for group actions

%3CLINGO-SUB%20id%3D%22lingo-sub-1543168%22%20slang%3D%22en-US%22%3ECatch%20events%20for%20group%20actions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1543168%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20third%20party%20software%20in%20our%20enterprise%2C%20that%20keeps%20track%20of%20the%20states%20of%20our%20groups.%20This%20software%20should%20know%20about%20the%20existing%20groups%2C%20their%20memberships%20and%20names%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20keep%20the%20database%20up-to-date%2C%20I%20need%20to%20know%20when%20the%20following%20actions%20appear%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-%20User%20is%20added%2Fremoved%20from%20a%20group%3C%2FP%3E%3CP%3E-%20Group%20name%20is%20changed%3C%2FP%3E%3CP%3E-%20Group%20description%20is%20changed%3C%2FP%3E%3CP%3E-%20Group%20is%20deleted%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECurrently%20a%20job%20runs%20all%203%20hours%2C%20that%20is%20going%20through%20the%20database%20and%20checks%20each%20group%20with%20calling%20the%20graph.%20But%20this%20is%20a%20bad%20approach%2C%20because%20if%20my%20group%20amount%20grows%2C%20the%20running%20time%20of%20the%20jobs%20is%20longer%20and%20longer.%3C%2FP%3E%3CP%3EIt%20would%20be%20a%20lot%20better%20to%20catch%20a%20trigger%20event%20in%20Microsoft%20365%20if%20one%20of%20the%20above%20actions%20is%20happening%20on%20a%20group.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20give%20me%20a%20hint%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1543168%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Etrigger%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1544183%22%20slang%3D%22en-US%22%3ERe%3A%20Catch%20events%20for%20group%20actions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1544183%22%20slang%3D%22en-US%22%3E%3CP%3EUse%20the%20audit%20log%3A%26nbsp%3B%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fsearch-the-audit-log-in-security-and-compliance%3Fview%3Do365-worldwide%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoft-365%2Fcompliance%2Fsearch-the-audit-log-in-security-and-compliance%3Fview%3Do365-worldwide%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20fetch%20events%20programmatically%20via%20PowerShell%20or%20the%20management%20activities%20API.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I have a third party software in our enterprise, that keeps track of the states of our microsoft 365 groups. This software should know about the existing groups, their memberships and names etc.

 

To keep the database up-to-date, I need to know when the following actions appear:

 

- User is added/removed from a group

- Group name is changed

- Group description is changed

- Group is deleted

 

Currently a job runs all 3 hours, that is going through the database and checks each group with calling the graph. But this is a bad approach, because if my group amount grows, the running time of the jobs is longer and longer.

It would be a lot better to catch a trigger event in Microsoft 365 if one of the above actions is happening on a group.

 

Can you give me a hint?

1 Reply

Use the audit log: https://docs.microsoft.com/en-us/microsoft-365/compliance/search-the-audit-log-in-security-and-compl...

 

You can fetch events programmatically via PowerShell or the management activities API.