Does Nextcloud have some mechanism to automatically disable Apps (maybe after too many errors)?
I have my Nextcloud configured with LDAP and SAML (ADFS) and everything was working OK. Suddenly I noticed that the user_saml app was deactivated. I enabled it and everything was working again, but after some hours it was disabled again.