I will make the document more clear.
On the Gluu server side, we have the attr `uid` which is used to denote the primary key.
sAMAaccountName of AD is not available in the Gluu server by default.
As a solution :
1. You can add the attribute via oxTrust like you mentioned above.
2. Alternately (recommended), while configuring cache refresh under `Configuration` --> `Cache refresh` you can map source attrib to destination attributes under `Add source attribute to destination attribute mapping`
Here source value will be `sAMAccountName` and destination will be `uid`.
In adition; you sould also do this:
Under menu item `Configuration ` --> `Manage Authentication` --> `Manage LDAP Autentication`, you can configure
`Primary key` is the primary attribute of backend AD / LDAP (samAccountName in your case).
`Local Primary key ` is Gluu’s OpenDJ primary key ( which is UID )
Other than explaining this in a better way in the docs, I see everything working as per design.
Incase we're not on the same page, please list the exact steps, expected output, actual output.