# 7.3 Get Unjoined Public Groups

The `getUnjoinedPublicGroups` function returns all the public groups of the company, current employee is not a member of.

The function takes the following parameters :

* **sessionId** : Unique SessionId which is received in the login/registration function response.

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

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

{% endtab %}
{% endtabs %}
