# 7.8 Remove Group Member

The `removeGroupMember` function is used to remove a member from the Group. Any existing member of the group can remove other members. The developer can choose to build stricter access-control mechanisms on top of this if desired (e.g. only the group-owner or group-admin is authorized to remove members from the group).

The function takes the following parameters :

* **sessionId** : Unique SessionId which is received in the login/registration function response.
* **groupId**  :  GroupId of the group.
* **companyEmployeeId**  : CompanyEmployeeId of the member to be removed from the group.
* **companyName**  :  Name of the company of the member to be removed from the group.

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

```javascript
bayunCore.removeMemberFromGroup(
      "<sessionId>",
      "<groupId>",
      "<companyEmployeeId>",
      "<companyName>"
)
.then(result => {
      console.log("Response received for removeMemberFromGroup.");
      console.log(result);
})
.catch(error => {
      console.log("Error caught");
      console.log(error);
});
```

{% endtab %}
{% endtabs %}
