0
votes

Is there any way to list the owners of a recently deleted group with Graph API? I need to build a process with PowerAutomate to inform all the owners that their group is deleted.

With PowerShell I get this far:

Get-UnifiedGroup -Identity $guid -IncludeSoftDeletedGroups

Then I get a list of owners under the ManagedBy property, to bad, they are AD usernames only, not emails.

With Graph, I don't even get this far, I didn't find an an equivalent of the IncludeSoftDeletedGroups parameter and when I query for a deleted group I simply get an error that it doesn't exist. Can somebody please give me a hint?

1

1 Answers

0
votes
https://graph.microsoft.com/v1.0/directory/deletedItems/microsoft.graph.group

This is the call you need to do to get the recently deletedItems for groups(microsoft.graph.group). Please check this DeletedItems Doc.

Currently, there is no way to get the owners from deleted items, please raise the UserVoice