
DerickK.08586 (Customer) asked a question.
We are building change password functionality into our application, and I might have a user who is a member of multiple groups.
If I want to retrieve the password rules that will apply to the user via APIs, it appears that I need to do the following:
- Get the user's groups (/api/v1/users/${userId}/groups)
- Get password policies (/api/v1/policies?type=PASSWORD)
- Iterate through the password policies until I find a policy that contains a group that my user is a member of
Is there a better way to do this?

@DerickK.08586 (Customer) , My understanding is that you are looking for password applied to which group, if yes it is available in your api query (/api/v1/policies?type=PASSWORD) itself. it will shows as group id not name of the group.
Jijo
Thanks Jijo, but that is not what I am looking for. Let me try to clarify my question.
Suppose that I have user Sam who is a member of three groups with the following group IDs:
Also suppose that I have 4 password policies:
If I am building a custom "change password" solution, and in my UI I want to enforce the password rules that will apply to Sam, I think that I need to do the following:
I am hoping that there is an easier way do resolve which password rules I need to use if Sam wants to change their password.
@DerickK.08586 (Customer) , Thanks for the clarity, I think you should use 4 dedicated groups to apply the password policy.,which will be much simpler solution.