How to delete/wipe contacts with a users

2,813 views
Skip to first unread message

Peter Roelant

unread,
Jan 6, 2012, 6:45:36 AM1/6/12
to google-ap...@googlegroups.com
All,

Does anyone now how i can delete all contacts in a certain group with all users ?
Is this possible with GAM or any other means ?
Or simply not supported via the APIs

Tnx in advance,

Rgds,

Peter

Jay Lee

unread,
Jan 6, 2012, 8:24:07 AM1/6/12
to google-ap...@googlegroups.com
Hi Peter,

GAM does not have any commands that manage user contacts (or domain shared contacts for that matter). GAM tends to focus on Google Apps admin functionality rather than user data so it's unlikely I'll add such functionality anytime soon. However, it would be possible to do something like this with the Contacts API.

Jay

Peter Roelant

unread,
Jan 6, 2012, 12:05:19 PM1/6/12
to google-ap...@googlegroups.com
Jay,

Thanks for the update 

Rgds,

Peter

Sandip Shah

unread,
Jan 6, 2012, 12:14:58 PM1/6/12
to Google Apps Manager
Hi Peter,

It's definitely possible with the Contacts API (and OAuth). I have
done it in the past using Python and PHP.

SS

Lillian

unread,
Dec 3, 2012, 12:05:53 AM12/3/12
to google-ap...@googlegroups.com
Sandip,

Can you provide more details on how you've done this? I've recently found myself being a domain admin for my organization and one aggravating thing that has happened is that a user (e.g. John Doe) has left the company and his email account (jdoe) has been deleted; years later, a new user (Jane Doe) has joined the company and I created her the username "jdoe" without realizing that it formerly belonged to someone else. Now for users who were here when John Doe worked here, Jane Doe's name shows up as John Doe in chat and in autocomplete.

The only solution I have found so far is to instruct all the other users to delete the John Doe entry from their Contacts, but is there a way that I can do it for the whole domain?

Thanks,
Lillian

Charles M

unread,
Nov 25, 2013, 2:07:57 AM11/25/13
to google-ap...@googlegroups.com
Did you ever find a solution for this?

Confidentiality Disclaimer: This e-mail and any attachments are confidential and intended solely for the intended addressee and may also be privileged or exempt from disclosure under applicable law. If you are not the intended addressee, or have received this e-mail in error, please notify the sender immediately, delete it from your system and do not copy, disclose, distribute or otherwise act in reliance upon any part of this e-mail or its attachments. Australian International School Malaysia and all affiliates under Taylor's Education Group  does not accept responsibility for any loss arising from unauthorised access to, or interference with, any internet communications by any third party in reliance to this email, or from the transmission of any viruses. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of   Australian International School Malaysia and all affiliates under Taylor's Education Group. Replies to this e-mail may be monitored by   Australian International School Malaysia and all affiliates under Taylor's Education Group for operational or business reasons.

John NGUYEN

unread,
Nov 20, 2018, 3:44:29 AM11/20/18
to GAM for G Suite
We too are very interested in the Python and/or PHP solution.

James SEYMOUR

unread,
Nov 20, 2018, 10:47:27 PM11/20/18
to GAM for G Suite
Peter, you can use GAMADV-XTD to clear or delete contacts from users. At a simple level, you can use (see below) to clear a specific email address from users contacts. Clear will allow all the other data in the contact to remain. From what I understand, delete will remove the contact completely.

gam ou_and_children_ns <enter your top level OU here> clear contacts emailmatchpattern <enter contact email address to remove here>

Note, the syntax ou_and_children_ns will perform the gam command on all the active users (not suspended) in the top level OU you specify and in all the OU's under it.

For example I used this to clear the old Senior Management email address from all the contacts in the users in our Staff OU and sub-OUs.

James

CleberS

unread,
Jun 12, 2020, 9:26:12 AM6/12/20
to GAM for G Suite
Hi all, 
Would it be possible to give a wipe to a user's contacts?

I tried with:

gam contacts <user> wipe

no success.

Ross Scroggs

unread,
Jun 12, 2020, 9:41:11 AM6/12/20
to google-ap...@googlegroups.com
This requires Advanced GAM (https://github.com/taers232c/GAMADV-XTD3)

gam redirect csv UserContacts.csv user us...@domain.com print contacts
gam redirect stdout - multiprocess csv UserContacts.csv gam user "~User" delete contact "~ContactID"

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/8b294659-021d-4de0-b30c-dd17b33f33e7n%40googlegroups.com.

CleberS

unread,
Jun 12, 2020, 11:06:07 AM6/12/20
to GAM for G Suite
Thanks for your reply Ross.
Just to understand.

The first sentence is to list what you have in your contacts. and print in a Correct CSV?

"gam redirect csv UserContacts.csv user us...@domain.com print contacts " 

The second sentence is to take this CSV and delete correct?

"gam redirect stdout - multiprocess csv UserContacts.csv gam user "~User" delete contact "~ContactID""  

Ross Scroggs

unread,
Jun 12, 2020, 12:49:13 PM6/12/20
to google-ap...@googlegroups.com
Yes.
Step 1: collect the contacts
Step 2: delete the contacts

Ross



--
Reply all
Reply to author
Forward
0 new messages