Drupal is a registered trademark of Dries Buytaert
cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! linkit 7.0.15 Minor update available for module linkit (7.0.15). views_data_export 8.x-1.10 Minor update available for module views_data_export (8.x-1.10).

samlauth_restrict_to_ou

202 sites No security coverage
View on drupal.org

SAML Authentication Restrict to OU provides a security layer for the SAML Authentication module by restricting site access based on Organizational Unit (OU) attributes sent by the Identity Provider (IdP).

This module is specifically designed for Enterprise environments using Active Directory, allowing administrators to limit site access to specific departments or groups within a large organization without the overhead of managing individual Drupal roles for every user.

Features

  • Restrict Login Toggle: A master switch that allows you to enable or disable the restriction logic globally without losing your settings.
  • Distinguished Name (DN) Parsing: Automatically extracts multiple OU values from complex DN strings commonly sent by Active Directory (e.g., CN=user,OU=Marketing,OU=Users...).
  • Strict Mode: Optionally require that a user belongs to all listed OUs rather than just one (AND vs OR logic).
  • Customizable Access Denied Message: Control the exact message shown to rejected users, with support for basic HTML markup to ensure visibility.

Requirements

This module requires the SAML Authentication module.

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

Configuration

The configuration form is located at:

/admin/config/people/saml-restrict

From the configuration form you can:

  • Restrict Login to OUs: Enable the master toggle to begin enforcing restrictions.
  • SAML Attribute Name: Set this to the attribute containing your OU data. In most AD setups, this is dn.
  • Allowed OUs: Enter the names of authorized OUs, one per line (e.g., Staff, Faculty, Marketing). This check is case-insensitive to ensure reliable matching across directory updates. Do not include "ou=" prefixes.
  • Strict Mode: Check this if a user must be a member of every OU listed to gain access.
  • Access Denied Message: Customize the message displayed to users who are rejected. Basic HTML is supported.

Activity

Total releases
7
First release
Apr 2026
Latest release
1 month ago
Release cadence
0 days
Stability
86% stable

Release Timeline

Releases

Version Type Release date
1.0.5 Stable Apr 10, 2026
1.0.4 Stable Apr 10, 2026
1.0.3 Stable Apr 10, 2026
1.0.2 Stable Apr 10, 2026
1.x-dev Dev Apr 10, 2026
1.0.1 Stable Apr 10, 2026
1.0.0 Stable Apr 10, 2026