LDAP group links
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
List, add, and delete LDAP group links.
List LDAP group links
Lists LDAP group links.
GET /groups/:id/ldap_group_links
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
id | integer/string | yes | The ID or URL-encoded path of the group. |
Example request:
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/4/ldap_group_links"
Example response:
[
{
"cn": "group1",
"group_access": 40,
"provider": "ldapmain",
"filter": null,
"member_role_id": null
},
{
"cn": "group2",
"group_access": 10,
"provider": "ldapmain",
"filter": null,
"member_role_id": null
}
]
Add an LDAP group link with CN or filter
Adds an LDAP group link using a CN or filter.
POST /groups/:id/ldap_group_links
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
id | integer/string | yes | The ID or URL-encoded path of the group. |
group_access | integer | yes | Role (access_level ) for members of the LDAP group. |
provider | string | yes | LDAP provider ID for the LDAP group link. |
cn | string | yes/no | The CN of an LDAP group. Provide either a cn or a filter , but not both. |
filter | string | yes/no | The LDAP filter for the group. Provide either a cn or a filter , but not both. |
member_role_id | integer | no | The ID of the member role. Ultimate only. |
Example request:
curl --request POST \
--header "PRIVATE-TOKEN: <your_access_token>" \
--header "Content-Type: application/json" \
--data '{"group_access": 40, "provider": "ldapmain", "cn": "group2"}' \
--url "https://gitlab.example.com/api/v4/groups/4/ldap_group_links"
Example response:
{
"cn": "group2",
"group_access": 40,
"provider": "main",
"filter": null,
"member_role_id": null
}
Delete an LDAP group link with CN or filter
Deletes an LDAP group link using a CN or filter.
DELETE /groups/:id/ldap_group_links
Supported attributes:
Attribute | Type | Required | Description |
---|---|---|---|
id | integer/string | yes | The ID or URL-encoded path of the group |
provider | string | yes | LDAP provider ID for the LDAP group link. |
cn | string | yes/no | The CN of an LDAP group. Provide either a cn or a filter , but not both. |
filter | string | yes/no | The LDAP filter for the group. Provide either a cn or a filter , but not both. |
Example request:
curl --request DELETE \
--header "PRIVATE-TOKEN: <your_access_token>" \
--header "Content-Type: application/json" \
--data '{"provider": "ldapmain", "cn": "group2"}' \
--url "https://gitlab.example.com/api/v4/groups/4/ldap_group_links"
If successful, no response is returned.
Delete an LDAP group link (deprecated)
Deletes an LDAP group link. Deprecated. Scheduled for removal in a future release. Use Delete an LDAP group link with CN or filter instead.
Delete an LDAP group link with a CN:
DELETE /groups/:id/ldap_group_links/:cn
Attribute | Type | Required | Description |
---|---|---|---|
id | integer/string | yes | The ID or URL-encoded path of the group |
cn | string | yes | The CN of an LDAP group |
Delete an LDAP group link for a specific LDAP provider:
DELETE /groups/:id/ldap_group_links/:provider/:cn
Attribute | Type | Required | Description |
---|---|---|---|
id | integer/string | yes | The ID or URL-encoded path of the group |
cn | string | yes | The CN of an LDAP group |
provider | string | yes | LDAP provider for the LDAP group link |
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support