How do I get a list of groups where the User is the Owner?

733 views
Skip to first unread message

Karen Dienhart

unread,
Jun 11, 2019, 3:36:36 PM6/11/19
to GAM for G Suite

Full steps to reproduce the issue:

gam info user


Expected outcome (what are you tryingto do?):

List the groups that the user owns


Actual outcome (what errors or bad behavior do you see instead?):

Gives a list of all the groups that the user belongs to, but no information on the role (owner, manager, member)

Ross Scroggs

unread,
Jun 11, 2019, 5:11:33 PM6/11/19
to google-ap...@googlegroups.com
Karen,

I'm assuming you have a current version of Basic GAM:
Linux/Mac OS.

$ export GAM_CSV_ROW_FILTER='{"Owners": "regex:us...@domain.com"}'

$ gam print groups member us...@domain.com owners delimiter " "


On Windows

$ set GAM_CSV_ROW_FILTER={"Owners": "regex:user@domain,com"}

$ gam print groups member us...@domain.com owners delimiter " "


Substitute desired value for us...@domain.com


Ross


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/4b61afe9-ba45-4854-b538-7a4c071ec318%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Karen Dienhart

unread,
Jun 11, 2019, 8:06:13 PM6/11/19
to GAM for G Suite
YES!!!! Worked like a Charm (Windows).  I extracted the section with the group names, number of owners, list of owners and converted the texts, delimited by commas, into columns in Excel.

Thank you Ross!


On Tuesday, June 11, 2019 at 2:11:33 PM UTC-7, Ross Scroggs wrote:
Karen,

I'm assuming you have a current version of Basic GAM:
Linux/Mac OS.

$ export GAM_CSV_ROW_FILTER='{"Owners": "regex...@domain.com"}'

$ gam print groups member us...@domain.com owners delimiter " "


On Windows

$ set GAM_CSV_ROW_FILTER={"Owners": "regex:user@domain,com"}

$ gam print groups member us...@domain.com owners delimiter " "


Substitute desired value for us...@domain.com


Ross

On Tue, Jun 11, 2019 at 12:36 PM Karen Dienhart <karen....@lacity.org> wrote:

Full steps to reproduce the issue:

gam info user


Expected outcome (what are you tryingto do?):

List the groups that the user owns


Actual outcome (what errors or bad behavior do you see instead?):

Gives a list of all the groups that the user belongs to, but no information on the role (owner, manager, member)

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

James SEYMOUR

unread,
Jun 25, 2019, 4:17:05 AM6/25/19
to GAM for G Suite
Hi Ross when I run this in the Cloud I don't seem to get the desired results, i.e. only showing the groups where the user is the owner.

I run export GAM_CSV_ROW_FILTER='{"Owners": "regex:<User Email Address>"}' then run gam print groups member <User Email Address> owners delimiter " " todrive.

The file it produces, shows email, OwnersCount & Owners, lists all the groups the user is in and then in the Owner column shows who the owner is, even if the owner is not the user or there are no owners. Admittedly It is easy to filter.

Cheers

James


On Wednesday, 12 June 2019 05:11:33 UTC+8, Ross Scroggs wrote:
Karen,

I'm assuming you have a current version of Basic GAM:
Linux/Mac OS.

$ export GAM_CSV_ROW_FILTER='{"Owners": "regex...@domain.com"}'

$ gam print groups member us...@domain.com owners delimiter " "


On Windows

$ set GAM_CSV_ROW_FILTER={"Owners": "regex:user@domain,com"}

$ gam print groups member us...@domain.com owners delimiter " "


Substitute desired value for us...@domain.com


Ross

On Tue, Jun 11, 2019 at 12:36 PM Karen Dienhart <karen....@lacity.org> wrote:

Full steps to reproduce the issue:

gam info user


Expected outcome (what are you tryingto do?):

List the groups that the user owns


Actual outcome (what errors or bad behavior do you see instead?):

Gives a list of all the groups that the user belongs to, but no information on the role (owner, manager, member)

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
Ross Scroggs

Ross Scroggs

unread,
Jun 25, 2019, 9:01:28 AM6/25/19
to google-ap...@googlegroups.com
James,

The form of the row filtering that you show is for Basic GAM, for Advanced GAM you would do:
gam config csv_output_row_filter '{"Owners": "regex:<User Email Address>"}' print groups member <User Email Address> owners delimiter " " todrive

As of version 4.86.05 you can do the following:
gam print groups showownedby <User Email Address> todrive

Ross
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

James SEYMOUR

unread,
Jun 25, 2019, 6:26:58 PM6/25/19
to GAM for G Suite
Thanks Ross, all saved on my notes site for future use :)


On Tuesday, 25 June 2019 21:01:28 UTC+8, Ross Scroggs wrote:
James,

The form of the row filtering that you show is for Basic GAM, for Advanced GAM you would do:
gam config csv_output_row_filter '{"Owners": "regex:<User Email Address>"}' print groups member <User Email Address> owners delimiter " " todrive

As of version 4.86.05 you can do the following:
gam print groups showownedby <User Email Address> todrive

Ross
Reply all
Reply to author
Forward
0 new messages