Forum Discussion
Get AD Group created date and filter?
This may be an easy question but I can't seem to figure it out. I want to export all the AD groups in my tenant with createdDateTime as a piece. I tried Get-AzureADGroups but couldn't find a way to get that piece in output. I found it via Graph Explorer but I admit I am still learning that and don't know how to output well. Thanks for any pointers to examples or guides.
Brian
- tumtum1973Copper Contributor
Here are two queries you can use in Graph Explorer to get the information you are interested in.
Get All groups in your Organization
https://graph.microsoft.com/v1.0/groupsGet All groups in your Organization filtered by ID, Group Name, and Creation Date
https://graph.microsoft.com/v1.0/groups?$select=id,displayName,CreatedDateTimeI personally use the Graph Explorer to interrogate the API and figure out my queries but prefer to use Powershell to execute a Graph API call on a routine basis. Linked below is a great article to get you started.
https://adamtheautomator.com/microsoft-graph-api-powershell/
Thanks,
Steve
tumtum