How can I get the enrolled users list from my XBlock?

Hi.
I am trying to get the list of the course enrolled users from the author_view in my XBlock in order to be able to compose subgroups with them.
I tried the way from xblock-group-project-v2, https://github.com/open-craft/xblock-group-project-v2/blob/d72febc1ef8ef2df1a2c460c178d57c376af9aa4/group_project_v2/group_project.py#L597 but I believe its not implemented.
Is there any way to do this directly?
Thanks in advance

You’re right that the group project v2 block is not supported on the standard Open edX platform.

Perhaps check out the Teams API and look at what the peer assessment code in the open response assessment XBlock is doing, for some examples?

There is also an enrollment REST API.