Trigger reset password every x days

Hello all,
I was wondering if there is any option in keycloak (version 21.1.2) to trigger reset password every x days.

Thank you in advance.

Just add a password policy…
Be aware that the new password policy will apply only to new users

@vbauche Password policy for the existing users how it can be applied via keycloak?

I can see that via the custom provider i have access to int daysToExpire = realm.getPasswordPolicy().getDaysToExpirePassword(); at the isValid method.

At the realm settings i don’t see anything related to setting up a password policy.

Any advise on this?

Password policy is not configured in Realm settings but in Authentication section :

For existing users keycloak documentation says :
The new policy will not be effective for existing users.

But I think it could work for the pasword exipation : you should test it

1 Like

@vbauche Thank you very much!