Adds --select as a flag for the list group-members command
Defaults the $select param to the following if the flag is not present:
odata.type
id
displayName
createdDateTime
Ensure an escape hatch for --select="" in order to return Azure default entity properties
Support custom --select properties as a comma delimited list as well ex: --select="id,assignedPlans,email"
Cleaned up some duplicate logic as well
Motivation and Context
Decrease file size by defaulting to a property list that will keep file sizes low but ensure there's still an ability to pull any / all properties for group members.
Description
Part 2 of BED-4586 Closes https://github.com/BloodHoundAD/AzureHound/issues/69 Closes https://github.com/BloodHoundAD/AzureHound/pull/64
Adds
--select
as a flag for thelist group-members
commandDefaults the
$select
param to the following if the flag is not present:Ensure an escape hatch for
--select=""
in order to return Azure default entity properties Support custom--select
properties as a comma delimited list as well ex:--select="id,assignedPlans,email"
Cleaned up some duplicate logic as well
Motivation and Context
Decrease file size by defaulting to a property list that will keep file sizes low but ensure there's still an ability to pull any / all properties for group members.
This should address concerns from https://github.com/BloodHoundAD/AzureHound/issues/69 This was inspired by the efforts of @malac and PR https://github.com/BloodHoundAD/AzureHound/pull/64
How Has This Been Tested?
Ran locally in azurehound directory after
go build
./azurehound list group-members --json -o path/to/output.json --select=""
./azurehound list group-members --json -o path/to/output.json
./azurehound list group-members --json -o path/to/output.json --select="id,assignedPlans,email"
Also ingested into Bloodhound Enterprise and verified no apparent errors with analysis.
Updated unit tests
Types of changes
Checklist: