API for updating user encryption password on sso password change

I use nextcloud using a SSO system (LDAP) where users often change their password. As I use exncryption, users need to align each time the encryption password on Nextcloud, too.
Is there any kind of API so that I can implement a system that, on password change on LDAP I update automatically the encryption password on Nextcloud? Is there any web service or something like that?
Thank you.

Do you use external storage? That’s what the server-side encryption was made for. On server-based storage, you add a huge amount of complexity to the system without having the full benefits.

No, I use internal storage but I need to provide my users great privateness level, so that neither me (Administrator) can open their files.
But I have the problem of the refresh of the encryption password when users change their own passwords in LDAP.
I can implement a conection that automatically update such a password but I need to understand how I can do this using some API or some cli commands.
Any help?

no one can sugget me some way to accomplish what needed?