doc/administration/gitlab_duo/configure/access_control.md
{{< details >}}
{{< /details >}}
{{< history >}}
{{< /history >}}
You can turn GitLab Duo on or off for a group or restrict access to GitLab Duo for one or more groups.
{{< history >}}
{{< /history >}}
{{< tabs >}}
{{< tab title="On GitLab.com" >}}
Prerequisites:
To restrict access to GitLab Duo for a top-level group:
In the top bar, select Search or go to and find your group.
In the left sidebar, select Settings > GitLab Duo.
Select Change configuration.
Under Restrict access based on group membership, select Add group.
From the dropdown list, select a group.
When you select the first group, a default All eligible users rule is also added. You can use this rule to configure access for all other users. This rule is automatically deleted when the group has no access to GitLab Duo Non-Agentic or GitLab Duo Agent Platform and all existing groups are removed.
Select whether direct members of the group can access GitLab Duo Non-Agentic and GitLab Duo Agent Platform.
Select Save changes.
These settings apply to the following users:
When you configure access controls, you can select only groups that are direct subgroups of the top-level group. You cannot use nested subgroups in access control rules.
{{< /tab >}}
{{< tab title="On GitLab Self-Managed" >}}
Prerequisites:
To restrict access to GitLab Duo for an instance:
In the upper-right corner, select Admin.
In the left sidebar, select GitLab Duo.
Select Change configuration.
Under Restrict access based on group membership:
From the dropdown list, select a group.
When you select the first group, a default All eligible users rule is also added. You can use this rule to configure access for all other users. This rule is automatically deleted when the group has no access to GitLab Duo Non-Agentic or GitLab Duo Agent Platform and all existing groups are removed.
Select whether direct members of the group can access GitLab Duo Non-Agentic and GitLab Duo Agent Platform.
Select Save changes.
These settings apply to users who are direct members of one of the groups configured under Restrict access based on group membership.
When you configure access controls, you can select only top-level groups. You cannot use subgroups in access control rules.
{{< /tab >}}
{{< /tabs >}}
If you do not want to manually manage group membership, you can synchronize membership by using LDAP or SAML.
When a user is assigned to more than one group, the user has access to features from all assigned groups. For example, if a user has access to GitLab Duo Non-Agentic in group A and GitLab Duo Agent Platform in group B, the user has access to both sets of features.
If the All eligible users rule is configured, the following users can access both GitLab Duo Non-Agentic and GitLab Duo Agent Platform:
Additional controls (such as disabling features for the top-level group or instance) still apply.
If you use LDAP or SAML for authentication, you can synchronize group membership automatically:
For more information, see:
You can use access control for phased rollouts or testing and validation.
To implement a phased rollout of GitLab Duo:
pilot-users).To test GitLab Duo capabilities in a controlled environment:
agent-testers).agent-testers group.A user cannot access GitLab Duo features in the following scenarios:
To resolve this issue, do one of the following:
In GitLab 18.8 and earlier, if you give a group access to GitLab Duo Agent Platform but not to GitLab Duo Non-Agentic, the GitLab Duo sidebar does not display for members of that group. As a workaround, ensure the group has access to both GitLab Duo Non-Agentic and GitLab Duo Agent Platform.
To resolve this issue, upgrade to GitLab 18.9 or later.