diff --git a/client/users.go b/client/users.go index bbbf43f..a84713a 100644 --- a/client/users.go +++ b/client/users.go @@ -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 diff --git a/cmd/list-users.go b/cmd/list-users.go index e3f06d4..7a71eca 100644 --- a/cmd/list-users.go +++ b/cmd/list-users.go @@ -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