# Document-level security - User attributes from LDAP

**URL:** <https://forum.opensearch.org/t/document-level-security-user-attributes-from-ldap/1201>\
**Category:** Security\
**Created:** [July 24, 2019, 5:48am UTC](https://forum.opensearch.org/t/document-level-security-user-attributes-from-ldap/1201 "2019-07-24T05:48:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stmx38](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/stmx38/32/4354_2.png) [@stmx38](https://forum.opensearch.org/u/stmx38)\
**Post date:** [July 24, 2019, 5:48am UTC](https://forum.opensearch.org/t/document-level-security-user-attributes-from-ldap/1201/1 "2019-07-24T05:48:49Z")

</div>

Hello,

We have started to use ABAC as described in the documentation: [https://opendistro.github.io/for-elasticsearch-docs/docs/security-access-control/document-level-security/](https://opendistro.github.io/for-elasticsearch-docs/docs/security-access-control/document-level-security/)

With some workaround, it works in our case: [Document-level security - Multiple attributes based access](https://forum.opensearch.org/t/document-level-security-multiple-attributes-based-access/1187)

And now we consider to use LDAP users instead of the internal ones.  
Is there a way to use somehow LDAP user attributes how we use it for the internal ones?

Thank you!

---

<div class="post-metadata">

**Author:** ![Anthony](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/anthony/32/9939_2.png) [@Anthony](https://forum.opensearch.org/u/Anthony)\
**Post date:** [April 26, 2021, 11:06am UTC](https://forum.opensearch.org/t/document-level-security-user-attributes-from-ldap/1201/2 "2021-04-26T11:06:41Z")

</div>

@stmx38  
Did you manage to get this working?

The LDAP attributes can be used for DLS as below:

dls: ‘{“term” : {“tel”: “${attr.ldap.department}”}}’

further docs are available [here](https://opendistro.github.io/for-elasticsearch-docs/old/0.9.0/docs/security/document-level-security/#parameter-substitution)
