Delete "Other" & "Frequent" contacts for all the users

827 views
Skip to first unread message

Immanuel Wonderful

unread,
Oct 18, 2023, 10:15:03 AM10/18/23
to GAM for Google Workspace
Hi Team,

Is there any way to delete the contact x...@xyz.com from the "Other" and "Frequent" contacts for all users?
Thanks in Advance.


Robert Fine

unread,
Oct 19, 2023, 6:42:29 AM10/19/23
to GAM for Google Workspace
Hi Immanuel, 

When deleting a contact from Other Contacts it also deletes it from Frequent. 

see steps below to delete an othercontact

Contacts in 'Other Contacts' are identified with a resourceName similar to otherContacts/c888xxxxxxxxxx999. This resourceName is used to delete the contacts.

user

gam user <User Email Address> delete othercontacts <Resource Name>


Immanuel Wonderful

unread,
Oct 20, 2023, 8:31:24 AM10/20/23
to GAM for Google Workspace
Thank you Robert for your prompt response.

Could you help me find the contact resource name and command for CSV?

Immanuel

Ross Scroggs

unread,
Oct 20, 2023, 8:35:41 AM10/20/23
to google-ap...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" 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/b1b7d014-491a-478f-9426-b460f941f611n%40googlegroups.com.

Immanuel Wonderful

unread,
Oct 20, 2023, 8:59:48 AM10/20/23
to GAM for Google Workspace
Thank you Ross, I am not a techie, please help me to get the resource name of the user contact.

Ross Scroggs

unread,
Oct 20, 2023, 9:03:08 AM10/20/23
to google-ap...@googlegroups.com
Immanuel,

Look at the examples:

gam user us...@domain.com delete othercontacts emailmatchpattern "x...@xyz.com"

Ross
----
Ross Scroggs


Immanuel Wonderful

unread,
Oct 20, 2023, 10:02:24 AM10/20/23
to GAM for Google Workspace
Thanks, Ross.

I think the command went wrong.

gam user a...@xyz.com delete othercontacts emailmatchpattern "c...@xyz.com"
Getting all Other Contacts for  a...@xyz.com
Got 440 Other Contacts...
User:  a...@xyz.com, Delete maximum of 440 Other Contacts
  User:  a...@xyz.com , Other Contact: otherContacts/c5028667479871648851, Deleted (105/440)

My requirement is to delete the other contact and frequent contact c...@xyz.com from a...@xyz.com email account

Immanuel.

Robert Fine

unread,
Oct 20, 2023, 10:09:17 AM10/20/23
to GAM for Google Workspace
Hi Immanuel, 

If you look in the account that you used after user, you'll see that it has deleted the othercontacts and frequent contact you stated after emailmatchpattern. 

Gam stated it a bit weird i know. 
But it looks through all the othercontacts for the account used by u 440 othercontacts, 
then looks through the 440 othercontacts and deletes the othercontact you specified. 

it only deletes in this line: User:  a...@xyz.com , Other Contact: otherContacts/c5028667479871648851, Deleted (105/440)

Immanuel Wonderful

unread,
Oct 20, 2023, 11:04:51 AM10/20/23
to GAM for Google Workspace
Thanks Robert.

Could you please give me the correct command to delete a contact from the "other" and ""frequent" contacts from all the users email account.

Immanuel.

Ross Scroggs

unread,
Oct 20, 2023, 11:09:37 AM10/20/23
to google-ap...@googlegroups.com
gam all users delete othercontacts emailmatchpattern "x...@xyz.com"
----
Ross Scroggs



Reply all
Reply to author
Forward
0 new messages