> For the complete documentation index, see [llms.txt](https://docs.bayunsystems.com/bayuncoresdk-python/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bayunsystems.com/bayuncoresdk-python/groups/get-my-groups.md).

# 6.2 Get My Groups

The `getMyGroups` function returns all the groups, both public and private, the user is a member of.

The function takes the following parameters :

* **sessionId** : Unique SessionId which is received in the authenticate function response.

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

```python
response = bayunCore.myGroups(sessionId)
groups = response.getGroups()
print("\nMy Groups Response : ")
for groupInfo in groups:
    print("\nGroup Id : " + groupInfo.groupId)
    print("Group Name : " + groupInfo.name)
    print("Group Type : " + groupInfo.type)
```

{% endtab %}
{% endtabs %}
