Thank you for reaching out to us. As I understand you are trying to retrieve the information about inactive or empty groups in Azure AD.
Currently there is no option in Azure AD portal to retrieve this information, however you can run the below PowerShell commands to achieve the desired result ( helps to find the groups with no members in it ).
Get-MsolGroup -GroupType Security | ? {(Get-MsolGroupMember -GroupObjectId $_.ObjectId).count -eq 0 }
Get-MsolGroup -GroupType DistributionList | ? {(Get-MsolGroupMember -GroupObjectId $_.ObjectId).count -eq 0 }
Get-MsolGroup -GroupType MailenabledSecurity | ? {(Get-MsolGroupMember -GroupObjectId $_.ObjectId).count -eq 0 }
I have tested the above commands in my lab, it works as expected.
Let me know if you have any further questions.
Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.