LDAP settings for SAML AD SSO and environment variable?

Trying to fix LDAP settings for AD SSO using kerberos in apache and using environment variable in the SAML app.

I have read this https://github.com/nextcloud/user_saml/issues/118 and is now wondering which LDAP settings I should use for SSO in the LDAP app?

Added the fix about lower case in the SAML app

Current LDAP query for login attribute:

Under Expert tab I shall change Internal Username Attribute from samaccountname to %uid?