Skip to content

Commit

Permalink
Merge pull request #48 from BloodHoundAD/Fix-collection-for-AZUser-ob…
Browse files Browse the repository at this point in the history
…jects

fix: collect ingestible properties for azuser objects
  • Loading branch information
ddlees authored Aug 31, 2023
2 parents 8eda432 + f92070e commit a6a603c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion client/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func (s *azureClient) ListAzureADUsers(ctx context.Context, filter string, searc
errResult = azure.UserResult{}
nextLink string
)

if users, err := s.GetAzureADUsers(ctx, filter, search, orderBy, selectCols, 999, false); err != nil {
errResult.Error = err
out <- errResult
Expand Down
14 changes: 13 additions & 1 deletion cmd/list-users.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,19 @@ func listUsers(ctx context.Context, client client.AzureClient) <-chan interface{
go func() {
defer close(out)
count := 0
for item := range client.ListAzureADUsers(ctx, "", "", "", nil) {
for item := range client.ListAzureADUsers(ctx, "", "", "", []string{
"accountEnabled",
"createdDateTime",
"displayName",
"jobTitle",
"lastPasswordChangeDateTime",
"mail",
"onPremisesSecurityIdentifier",
"onPremisesSyncEnabled",
"userPrincipalName",
"userType",
"id",
}) {
if item.Error != nil {
log.Error(item.Error, "unable to continue processing users")
return
Expand Down

0 comments on commit a6a603c

Please sign in to comment.