A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Based on my research, the most suitable approach for your scenario is to use Audit log activities available in Microsoft Purview. This allows you to capture and review important events related to access and permissions.
Through audit logs, you can track activities such as:
+Users being added to or removed from a SharePoint site
+SharePoint groups being added to or removed from a site
+Users being added to or removed from SharePoint groups that have access to a site
References:
- https://learn.microsoft.com/en-us/purview/audit-log-activities#sharing-and-access-request-activities
- https://learn.microsoft.com/en-us/purview/audit-log-activities#site-permissions-activities
- https://learn.microsoft.com/en-us/purview/audit-search
For approaches that involve APIs, you may refer to the following Office 365 Management Activity API reference | Microsoft Learn. This includes audit data such as Audit.SharePoint
I hope this provides additional insight.
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.