gocloak
gocloak copied to clipboard
GetUserCount ignores IDPAlias in GetUsersParams
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:
- Setup a Keycloak Instance and client
- Connect an Identity Provider
- Login into Keycloak via OpenID Connect by using a User from the external Identity Provider
- 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