Remove email delgation

8,918 views
Skip to first unread message

JasonW

unread,
Aug 31, 2015, 12:38:49 PM8/31/15
to Google Apps Manager
Hello All, 

I was wondering if anyone could help me out with removing a delegated email account?

to Delegate:  

gam user <user1> delegate to <user2>

Not sure how to reverse this!   Also, if anyone knows of a detailed help file where I can see a complete list of commands and syntax that would be great. 

Thank You!

Jay Lee

unread,
Aug 31, 2015, 12:41:10 PM8/31/15
to Google Apps Manager

--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" 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 http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/e7b13af0-61a4-48a7-86b5-1d5c1ec02d7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Jay Lee

JasonW

unread,
Aug 31, 2015, 12:42:29 PM8/31/15
to Google Apps Manager
ahhh I didn't see that delete option.  Thanks friend!


On Monday, August 31, 2015 at 9:41:10 AM UTC-7, Jay Lee wrote:
On Mon, Aug 31, 2015 at 12:38 PM JasonW <jwin...@gmiweb.com> wrote:
Hello All, 

I was wondering if anyone could help me out with removing a delegated email account?

to Delegate:  

gam user <user1> delegate to <user2>

Not sure how to reverse this!   Also, if anyone knows of a detailed help file where I can see a complete list of commands and syntax that would be great. 

Thank You!

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

Jay Lee

Noor Shimul

unread,
Feb 20, 2019, 7:08:04 AM2/20/19
to GAM for G Suite
User has delegate access to few accounts how do I remove all delegates at once using GAM rather then individually?

Thanks,

Ross Scroggs

unread,
Feb 20, 2019, 8:07:49 AM2/20/19
to google-ap...@googlegroups.com
Noor,

I need clarification as to what case you're describing.
Case 1 - delegator userx has multiple delegates: userx has delegates user1,user2,user3
gam user us...@domain.com print delegates | gam csv - gam user "~User" delete delegate "~delegateAddress"

Case 2 - multiple delegators have userx as a delegate: user1,user2,user3 all have delegate userx
This is much harder.

--
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.

Noor Shimul

unread,
Feb 20, 2019, 10:24:19 AM2/20/19
to GAM for G Suite
Ross, 

it would be user x has access to multiple mailbox i.e. user1, user2 and user 3's mailbox. How do I remove all at once? will this has to be done through csv?


Thanks,


On Wednesday, 20 February 2019 13:07:49 UTC, Ross Scroggs wrote:
Noor,

I need clarification as to what case you're describing.
Case 1 - delegator userx has multiple delegates: userx has delegates user1,user2,user3
gam user us...@domain.com print delegates | gam csv - gam user "~User" delete delegate "~delegateAddress"

Case 2 - multiple delegators have userx as a delegate: user1,user2,user3 all have delegate userx
This is much harder.

On Feb 20, 2019, at 1:21 AM, Noor Shimul <noor....@cabinetoffice.gov.uk> wrote:

User has delegate access to few accounts how do I remove all delegates at once using GAM rather then individually?

Thanks,

On Monday, 31 August 2015 17:38:49 UTC+1, JasonW wrote:
Hello All, 

I was wondering if anyone could help me out with removing a delegated email account?

to Delegate:  

gam user <user1> delegate to <user2>

Not sure how to reverse this!   Also, if anyone knows of a detailed help file where I can see a complete list of commands and syntax that would be great. 

Thank You!

--
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

unread,
Feb 20, 2019, 11:26:46 AM2/20/19
to google-ap...@googlegroups.com
Noor,

This is much harder and can't be done in a single command; I'moffsite today,I'll send more information later this evening.

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.

Jay Lee

unread,
Feb 20, 2019, 11:54:56 AM2/20/19
to google-ap...@googlegroups.com
As Ross mentioned this is hard because you need to check every single account in the domain to see if it's delegated to the user. The API only tells you which accounts have access to a given mailbox, there's no reverse function to see which mailboxes a given account has delegated access to.

The quick and dirty solution would be to reset the user account and login as the user to see what they have access to.

Depending on the number of users in your domain, you can try running below, it may take a very long time to finish if you have more than a few hundred users:

gam print users | gamd csv - gam user ~primaryEmail show delegates >> delegations.txt

once complete delegations.txt should show all the delegations and you can search the file for the user you care about.

Jay

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/0b25cc33-3486-4c92-891b-4eabac49f2ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/7d853708-dc3a-4717-a048-a82bdb3ee789%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.

Ross Scroggs

unread,
Feb 20, 2019, 12:29:12 PM2/20/19
to google-ap...@googlegroups.com

Noor Shimul

unread,
Mar 18, 2019, 10:36:13 AM3/18/19
to GAM for G Suite
Hi Ross,


Thanks for your help so far, I am currently using the old version "GAM 4.55.43"

Thanks,

On Monday, 31 August 2015 17:38:49 UTC+1, JasonW wrote:

Ross Scroggs

unread,
Mar 18, 2019, 10:42:13 AM3/18/19
to google-ap...@googlegroups.com
Noor,

That is a very old version but the Gam command required (gam all users print delegates shownames > ./AllDelegates.csv) should work. If not, you'll need to upgrade.

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.

For more options, visit https://groups.google.com/d/optout.


--
Reply all
Reply to author
Forward
0 new messages