Hello. I managed to make a connection to our AD server and also manage the LDAP authentication, so the user from the AD can connect to our gluu server. I will here write the settings, so someone having the same problems can use it in the future.
# Cache Refresh Configuration:
**Source Backend LDAP Servers:**
* Name: source ##Very important to be exactly source
* Max connections: 10
* Base DN: dc=snt-is,dc=com
**Customer Backend Key/Attributes:**
* Key attribute: sAMAccountName
* Object class: user
* Source Attribute: cn,sn.mail,givenName,displayName
**Cache Refresh**
* Refresh Method: Copy
* Add source attribute to destination attribute mapping: samaaccountname->uid, cn->cn, sn->sn, mail->mail, givenname->givenname, displaynae->displayname
* Polling interval (minutes): 1
* Server IP address: <ip of gluu>
* Snapshots count: 20
* Search size limit:1000
* Cache Refresh: **Disabled**
After this we choose **Update**, after that, change the Cache Refresh to Enabled, and press **Update** again.
**# Manage Authentication:**
Add Source LDAP server.
Use the same parameters as in **Source Backend LDAP Servers:**. Add:
* Primary Key: SAMAccountName
* Local primary key: uid
* Activate the LDAP connection and press Test LDAP Connection to check.
That's it.