Remove Obsolete tag from contacts

606 views
Skip to first unread message

IndianaNetworkAdmin

unread,
Oct 25, 2019, 8:58:14 AM10/25/19
to GAM for G Suite
I have a domain with a large number of contact emails flagged as obsolete when they are current. Is there a simple way to remove all obsolete flags from a contact? I just want to make sure I'm not reinventing the wheel by having a Powershell script handle the logic and hit each contact one at a time.

Thank you for your time.

Ross Scroggs

unread,
Oct 25, 2019, 11:58:36 AM10/25/19
to google-ap...@googlegroups.com
Where do you see an obsolete flag? I'm not familiar with the term.

Ross

On Fri, Oct 25, 2019 at 5:58 AM IndianaNetworkAdmin <michael....@gmail.com> wrote:
I have a domain with a large number of contact emails flagged as obsolete when they are current. Is there a simple way to remove all obsolete flags from a contact? I just want to make sure I'm not reinventing the wheel by having a Powershell script handle the logic and hit each contact one at a time.

Thank you for your time.

--
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/c94903d5-55dd-4e15-9b4f-51f4d200eed2%40googlegroups.com.


--

IndianaNetworkAdmin

unread,
Oct 25, 2019, 12:50:51 PM10/25/19
to GAM for G Suite

obsolete.png

See screencap above.

GAM properly exports the flags when I export contacts with all fields. It is an email type.
So in the above example, I have:

Emails.2.address Emails.2.rank Emails.2.type
mor...@domain.com notprimary Obsolete


So my hope is that there is a way similarly to removing emails with a filter to instead change obsolete emails to primary and remove the obsolete flag. Otherwise I'll be having Powershell push through each contact in the domain and running an individual command for each one it finds.


On Friday, October 25, 2019 at 11:58:36 AM UTC-4, Ross Scroggs wrote:
Where do you see an obsolete flag? I'm not familiar with the term.

Ross

On Fri, Oct 25, 2019 at 5:58 AM IndianaNetworkAdmin <michael...@gmail.com> wrote:
I have a domain with a large number of contact emails flagged as obsolete when they are current. Is there a simple way to remove all obsolete flags from a contact? I just want to make sure I'm not reinventing the wheel by having a Powershell script handle the logic and hit each contact one at a time.

Thank you for your time.

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

IndianaNetworkAdmin

unread,
Oct 25, 2019, 2:16:07 PM10/25/19
to GAM for G Suite
I worked with Ross and we found that the email type where Obsolete was listed accepts string values as well as the normal types of work, other, etc. The Obsolete value was added due to an issue with data migration software using temporary addresses and promoting those to primary.

Here are the steps we took to fix the issue:

We obtained all data with:
gam config csv_output_row_filter "'Emails.*.type':regex:Obsolete" redirect csv "contacts.csv" multiprocess csv "users.csv" gam user ~primaryEmail print contacts fields emails

The redirect allowed us to export all data intelligently instead of exporting and working with a CSV for each individual user. We also limited our pull using regex so that only contacts with our unique Obsolete string were included in the list.

I edited contacts.csv:

Searched and replaced:
"primary": "true"
with
"primary": "false"

Because the types set as obsolete are the emails we want as our primary, this ensured that any currently set to primary were set to false.

Searched and replaced:
"Obsolete", "primary": "false"
with
"work", "primary": "true"

Because Obsolete is a unique string and the data was clustered together, we were able to use the above replacement to ensure anything labeled Obsolete was relabeled as work while at the same time setting primary to true.

Finally, we ran:

gam csv contacts.csv quotechar "'" gam user ~User update contacts ~ContactID json ~JSON

This took our newly saved JSON data and rewrote over the corresponding entries in G Suite.


Anand Umamaheswaran

unread,
Jun 9, 2022, 3:56:16 PM6/9/22
to GAM for Google Workspace
Hi,

How do i remove the Obsolete email address from contact? I already have primary email address but however my old email address show as Obsolete.

Ross Scroggs

unread,
Jun 9, 2022, 4:06:24 PM6/9/22
to google-ap...@googlegroups.com
Anand,

Contact me directly with a Meet/Zoom invitation.

Ross

--
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/059e7d86-1a1a-4410-8b21-17617d04ad45n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages