# Ansible configure AD/LDAP integration

**URL:** <https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299>\
**Category:** Graylog Central (peer support)\
**Created:** [October 18, 2018, 7:57am UTC](https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299 "2018-10-18T07:57:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erbaplue](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@erbaplue](https://community.graylog.org/u/erbaplue)\
**Post date:** [October 18, 2018, 7:57am UTC](https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299/1 "2018-10-18T07:57:20Z")

</div>

Hi,

I’m setting up graylog with ansible and was wondering if there is a possibility to configure the AD/LDAP integration also with ansible.

It seems those setting are stored in the mongodb buu is there an API or an other way to import/export them?

Thanks in advance.

Eric Baplue

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [October 18, 2018, 10:30am UTC](https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299/2 "2018-10-18T10:30:56Z")

</div>

use the API Browser to explore the options.

You will then find `/api/api-browser#!/System/LDAP` that gives you the options that you request.

---

<div class="post-metadata">

**Author:** ![erbaplue](https://avatars.discourse-cdn.com/v4/letter/e/ba8739/32.png) [@erbaplue](https://community.graylog.org/u/erbaplue)\
**Post date:** [October 18, 2018, 12:20pm UTC](https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299/3 "2018-10-18T12:20:09Z")

</div>

Thanks, this is what I was looking for. I have done the GET api/system/ldap/settings and I can save my settings.  
How could I do a POST api/system/ldap/test? When I use no parameter I get:  
{  
“type”: “ApiError”,  
“message”: “HTTP 415 Unsupported Media Type”  
}  
When I pu {} I get:  
{  
“type”: “ApiError”,  
“message”: “Can not construct instance of org.graylog2.rest.models.system.ldap.requests.LdapTestConfigRequest, problem: Null ldapUri\n at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@547f9139; line: 1, column: 2]”  
}  
And when I put the ldap\_uri I get:  
{  
“type”: “ApiError”,  
“message”: “”  
}

---

<div class="post-metadata">

**Author:** ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)\
**Post date:** [October 18, 2018, 2:21pm UTC](https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299/4 "2018-10-18T14:21:52Z")

</div>

Without knowing how you had send what - I can’t help you with that. But the Graylog Interface will only communicate the API the same way you do via CURL

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [November 1, 2018, 2:21pm UTC](https://community.graylog.org/t/ansible-configure-ad-ldap-integration/7299/5 "2018-11-01T14:21:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
