hi, we're searching users by email and it seems th...
# ask-a-descoper
e
hi, we're searching users by email and it seems that for tenants with SSO the users are not found while tenants without SSO resolve correctly. did any one else encounter this or something similar?
issue seems to have started around Dec 26. used endpoint
/v1/mgmt/user
r
Eran, can you try using the v2 endpoint and let me know if you encounter the same issues? also, are you searching by email or loginid? https://docs.descope.com/api/management/users/search-users
e
we
we're using the go SDK
Management.User().Load(ctx, req.Email)
which i see expects login id / user id we are passing email i'll look into v2 (is it new?)
r
it's used in Management.User().searchAll() but i see that the
Copy code
Management.User().Load()
accepts a loginIDOrUserID which is not an email always, especially when there are SSO tenants. the change in behaviour you experienced could be linked to the fact that some users were converted to sso only users. such as
<mailto:reuven@descope.com|reuven@descope.com>-tenantid
which we take the NameID and create a new loginID based on some conditions. so in that case, can you try to search with
Copy code
Management.User().SearchAll()
with the email field?
e
just to make sure i understand correctly,
Management.User().SearchAll()
uses v2? is there a difference in the user response? is there any recommendation as to which endpoint to use when?
r
Yes, and the response looks similar I would suggest trying that out and seeing if it doesn’t fail any processes from your side
✅ 1
I would generally use searchall because you are searching by email