Skip to content

Commit

Permalink
fix: select properties that are used in bloodhound ingest
Browse files Browse the repository at this point in the history
  • Loading branch information
ddlees committed Aug 31, 2023
1 parent 9501192 commit f92070e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
10 changes: 0 additions & 10 deletions client/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ func (s *azureClient) ListAzureADUsers(ctx context.Context, filter string, searc
errResult = azure.UserResult{}
nextLink string
)
selectCols := []string{
"id",
"displayName",
"jobTitle",
"lastPasswordChangeDateTime",
"mail",
"accountEnabled",
"onPremisesSecurityIdentifier",
"onPremisesSyncEnabled",
}
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 f92070e

Please sign in to comment.