# Stopping Active Directory users having default Graylog access

**URL:** https://community.graylog.org/t/stopping-active-directory-users-having-default-graylog-access/17246
**Category:** Graylog Central (peer support)
**Created:** [September 21, 2020, 5:42pm UTC](https://community.graylog.org/t/stopping-active-directory-users-having-default-graylog-access/17246 "2020-09-21T17:42:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nick](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@nick](https://community.graylog.org/u/nick)
#### Post date: [September 21, 2020, 5:42pm UTC](https://community.graylog.org/t/stopping-active-directory-users-having-default-graylog-access/17246/1 "2020-09-21T17:42:26Z")

</div>

I have Active Directory integration setup with LDAP group mapping working.

However I find that all AD users are granted a Reader role within the application by default.

By default I don’t want AD users to have a Graylog account at all, only those within the mapped AD groups setup in LDAP group mappings should have access to Graylog.

I’ve tried removing the Default User Role in the LDAP settings but it just sets back to Reader again.

Can I default block access to Graylog while still retaining AD integration?

---

<div class="post-metadata">

### Author: ![nick](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@nick](https://community.graylog.org/u/nick)
#### Post date: [September 21, 2020, 5:49pm UTC](https://community.graylog.org/t/stopping-active-directory-users-having-default-graylog-access/17246/2 "2020-09-21T17:49:24Z")

</div>

To add to this if I create a new AD group called Graylog\_Blocked, add a user to it and set the Group to have Role: None in the LDAP group mappings, the members of the Graylog\_Blocked group still appear to get Reader access even with Role group assigned to None.

---

<div class="post-metadata">

### Author: ![shoothub](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/shoothub/32/6412_2.png) [@shoothub](https://community.graylog.org/u/shoothub)
#### Post date: [September 22, 2020, 7:30am UTC](https://community.graylog.org/t/stopping-active-directory-users-having-default-graylog-access/17246/3 "2020-09-22T07:30:40Z")

</div>

Please use LDAP filter for users, so it will contain only members of group.

1. Your User Search Pattern probably is probably too wide, so it can include also another users. Use rather filter like this which include user members of group Graylog\_users:  
`(&(objectCategory=person)(objectClass=user)(sAMAccountName={0})(memberOf:CN=Graylog_users,DC=domain,DC=net)))`
2. I always try to use filter using AD mmc filter or powershell to check if it works (to debug), only remove part `(sAMAccountName={0})`  
[https://theitbros.com/ldap-query-examples-active-directory/](https://theitbros.com/ldap-query-examples-active-directory/)

---

<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: [October 6, 2020, 7:30am UTC](https://community.graylog.org/t/stopping-active-directory-users-having-default-graylog-access/17246/4 "2020-10-06T07:30:47Z")

</div>

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