I'm using the Microsoft Graph API to sync user details. When a group is deleted, I need to get all its members in order to update them accordingly.
Therefor, I track for group changes, and when a group is being deleted, I'm trying to fetch all its members with the function List deleted items. I'm using
GET https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.group?$select=id,members,displayName&$filter=id eq '53cb5660-d5ad-4610-b38b-ebde71e6c49b'
The function returns only the id and name, but no members. If I restore the groups, all the members relations resume.
If this is not the way to get members of deleted groups, what is the way?
And partially on the same issue, security groups on AD are not going to the recycle bin, and being deleted permanently, is it by design or a bug? How to get members of those groups after deletion?
https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.group
The query which you are using will give only return object types of groups(microsoft.graph.group) or users (microsoft.graph.user) from deleted items
Currently, there is no way to get the members from deleted items please raise theUserVoice
Security groups on AzureAD are not going to the recycle bin because of its design.Please refer this document