Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetUserCount ignores IDPAlias in GetUsersParams #378

Open
FloppyNotFound opened this issue Oct 17, 2022 · 0 comments
Open

GetUserCount ignores IDPAlias in GetUsersParams #378

FloppyNotFound opened this issue Oct 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@FloppyNotFound
Copy link

Describe the bug
I want to retrieve the amount of users which are registered via a certain IDP.
When I call the Method "GetUsers", the filter works as expected, but in the function "GetUserCount", the IDPAlias in GetUsersParams seems to be ignored.

To Reproduce
Steps to reproduce the behavior:

  1. Setup a Keycloak Instance and client
  2. Connect an Identity Provider
  3. Login into Keycloak via OpenID Connect by using a User from the external Identity Provider
  4. Call GetUserCount function as follows:
realm := "myrealm"
idp := "my-identity-provider"
userTotal, err := kcClient.GetUserCount(ctx, *kcAccessToken, realm, gocloak.GetUsersParams{
		IDPAlias: &idp,
})

Expected behavior
userTotal == 1

Actual behavior
userTotal == 2
Seems like the admin-User is counted as well, although it was obviously not registered via the IDP

Additional Information:

  • Version: v11

Screenshots
grafik

@Nerzal Nerzal added the bug Something isn't working label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants