Occ command add a group admin


I saw in the occ group commands that you can create groups and manipulate users on a group.
But I have not seen any command to add a group admin.

Is there something that can achieve this or should try to create an issue at the github repository?


Did u find a solution of this?
I am currently facing the same issue.

1 Like

I am also looking for occ commands to check group admins to list and configure them.

group:lists or user:info do not show the information.

1 Like

Hello ,

I think that I tried something with the rest API. It was a script that did this and only a user that is already an admin could do it (again all this I did them with a PHP script that used the rest API).

Sorry Benouare that I did not see your message earlier!

Hi Good questions.

First terminology…

The main web interface refers to “Group Admins” - but I think that terms is the same thing as “subadmin” which is often used.

I have not been able to find anything in the occ interface which is related to Group Admins. Possible there is something available on an option I have not tried yet. I get impression that not every possible feature is documented.
OCC Commands in Admin Manual

However there does seem to be something available, tho not used it myself,

Link below documents the functionality of a completely different interface to “occ”.

Rather it seems to be part of the “User Provisioning API” which is based on URL queries which return XML data.

Description of User Provisioning API, mention of subadmin

Example Return the subadmins of the group: mygroup

$ curl -X GET https://admin:secret@example.com/ocs/v1.php/cloud/groups/mygroup/subadmins

I have raised this as a feature request issue in Github Nextcloud/Server

Issue 27003