Get AD Group created date and filter?

%3CLINGO-SUB%20id%3D%22lingo-sub-1522381%22%20slang%3D%22en-US%22%3EGet%20AD%20Group%20created%20date%20and%20filter%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1522381%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20may%20be%20an%20easy%20question%20but%20I%20can't%20seem%20to%20figure%20it%20out.%20I%20want%20to%20export%20all%20the%20AD%20groups%20in%20my%20tenant%20with%26nbsp%3BcreatedDateTime%20as%20a%20piece.%20I%20tried%26nbsp%3BGet-AzureADGroups%20but%20couldn't%20find%20a%20way%20to%20get%20that%20piece%20in%20output.%20I%20found%20it%20via%20Graph%20Explorer%20but%20I%20admit%20I%20am%20still%20learning%20that%20and%20don't%20know%20how%20to%20output%20well.%20Thanks%20for%20any%20pointers%20to%20examples%20or%20guides.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBrian%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1522381%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Active%20Directory%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Contributor

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

1 Reply

@Brian Hoyt 

 

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/groups

 

Get All groups in your Organization filtered by ID, Group Name, and Creation Date
https://graph.microsoft.com/v1.0/groups?$select=id,displayName,CreatedDateTime

 

I 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