> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/pipes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/pipes/valves/microsoft-ad/remove-group-from-members.md).

# Remove Group From Members

Remove a single group from multiple members.

## Introduction

Before using this valve the LdapClient module must be configured and deployed with matching name as defined in "*namespace*"

## Configuration

{% hint style="info" %}
**Valve name:** `ActiveDirectoryRemoveGroupFromMembers`
{% endhint %}

{% tabs %}
{% tab title="Properties" %}

<table><thead><tr><th width="238">Name</th><th width="181">Description</th><th width="212">Default value</th><th width="125" data-type="checkbox">Mandatory</th><th data-type="checkbox">Expanded</th></tr></thead><tbody><tr><td><code>namespace</code></td><td>Bind to LdapClient module.</td><td><code>"default"</code></td><td>false</td><td>false</td></tr><tr><td><code>group_id</code></td><td>Group DN.</td><td></td><td>true</td><td>true</td></tr><tr><td><code>members_identifier</code></td><td>JsonArray with member objects or member DN.</td><td><code>"@json:${request.ad_pending_remove.all}"</code></td><td>true</td><td>true</td></tr><tr><td><code>id_property</code></td><td>Property on JSON object that contains the member DN.</td><td><code>"id"</code></td><td>false</td><td>false</td></tr></tbody></table>

{% endtab %}

{% tab title="Example" %}

```json
Example when data is from pipe request:
{
  "name": "ActiveDirectoryRemoveGroupFromMembers",
  "config": {
    "namespace": "ldap01",
    "id_property": "id",
    "group_id": "${request.selected_ad_id}",
    "members_identifier": "@json:${request.ad_pending_remove.all}"
  }
}

Example when data is generated in pipe:
{
    "name": "ActiveDirectoryRemoveMemberFromGroups",
    "config": {
        "namespace": "ldap01",
        "id_property": "id",
        "group_id": "${item.group_dn}",
        "members_identifier": "@json:${item.members.all}"
    }
}
```

{% endtab %}
{% endtabs %}

## Example pipe data (from pipe request)

```json
  "selected_ad_id" : "CN=Cert Publishers,CN=Users,DC=company,DC=local",
  "ad_pending_remove" : [ 
    { 
        "id" : "CN=Lance Armsson,OU=Demo,DC=company,DC=local", 
        "displayName" : "Lance Armsson" 
    }, 
    { 
        "id" : "CN=Britt Thomasson,OU=Demo,DC=company,DC=local", 
        "displayName" : "Britt Thomasson" 
    } 
],
```
