Skip to content

Commit

Permalink
Merge pull request #23 from appuio/workaround-pagination-limit
Browse files Browse the repository at this point in the history
Set pagination limit to 5000 when querying for users
  • Loading branch information
bastjan authored Feb 28, 2022
2 parents 13d880c + 06a0b60 commit 42495c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/pkg/sync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ type UserSyncer struct {
}

func (u *UserSyncer) Sync(ctx context.Context, realm, attribute, targetLabel, targetAnnotation string) error {
users, err := u.KeycloakClient.GetUsers(ctx, realm, gocloak.GetUsersParams{})
users, err := u.KeycloakClient.GetUsers(ctx, realm, gocloak.GetUsersParams{
Max: gocloak.IntP(5000),
})
if err != nil {
return fmt.Errorf("error fetching users: %w", err)
}
Expand Down

0 comments on commit 42495c6

Please sign in to comment.