ERROR: 412: Concurrent email update. - conditionNotMet

650 views
Skip to first unread message

Dan Rebney

unread,
Jul 25, 2018, 4:30:08 PM7/25/18
to GAM for G Suite
I am unable to delete or update aliases via CSV file. It will properly modify the first alias in the CSV but subsequent aliases are not modified and I get the ERROR: 412: Concurrent email update. - conditionNotMet

I did just get a new computer but I installed the GAM msi file then copied my GAM folder from my previous computer, everything else seems to be working fine.


my powershell command is: gam csv $csv gam delete alias ~Aliases

My CSV file is

the powershell output is
Deleting alias testi...@domain1.com
gam :
At line:1 char:1
+ gam csv $csv gam delete alias ~Aliases
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
ERROR: 412: Concurrent email update. - conditionNotMet
Deleting alias testi...@domain1.com
ERROR: 412: Concurrent email update. - conditionNotMet
Deleting alias testi...@domain2.com
Using 3 processes...

The NativeCommandError is not a concern as it still processes the command, but powershell just doesn't understand.

After running the command only testi...@domain1.com is deleted the others remain.

Any help?

Ross Scroggs

unread,
Jul 25, 2018, 4:51:29 PM7/25/18
to google-ap...@googlegroups.com
Dan,

Are both domain1.com and domain2.com part of the same customer id?
What does this do: gam csv $csv gam info alias ~Aliases

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/3d45af52-c1db-4d06-94ac-ea25aeee5407%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Dan Rebney

unread,
Jul 26, 2018, 11:27:12 AM7/26/18
to GAM for G Suite
Yes both are domains in the same G Suite account. I can manually remove either alias domain with gam delete alias al...@domain1.com(or domain2.com) but as part of my deprovisioning process I'm either transferring all aliases to someone else or removing all aliases, so I have powershell pull the aliases from gam info user $user, and parse just the aliases into a csv file. Previously this have worked just fine, but moving computers seems to have caused something to stop working correctly, even though I've re-authed this computer and all the commands work except for the gam csv command. Is there any easy way to see what permissions I've authorized GAM to do maybe I missed one?
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--

Ross Scroggs

unread,
Jul 26, 2018, 11:30:14 AM7/26/18
to google-ap...@googlegroups.com
Dan,

gam oauth info

Ross

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


--

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


--

Dan Rebney

unread,
Jul 26, 2018, 11:37:17 AM7/26/18
to google-ap...@googlegroups.com
Am I missing any GAM scopes or API scopes?
Gam Scopes (28):
  https://apps-apis.google.com/a/feeds/emailsettings/2.0/
  https://www.googleapis.com/auth/admin.datatransfer
  https://www.googleapis.com/auth/admin.directory.customer
  https://www.googleapis.com/auth/admin.directory.device.chromeos
  https://www.googleapis.com/auth/admin.directory.device.mobile
  https://www.googleapis.com/auth/admin.directory.domain
  https://www.googleapis.com/auth/admin.directory.group
  https://www.googleapis.com/auth/admin.directory.notifications
  https://www.googleapis.com/auth/admin.directory.orgunit
  https://www.googleapis.com/auth/admin.directory.resource.calendar
  https://www.googleapis.com/auth/admin.directory.rolemanagement
  https://www.googleapis.com/auth/admin.directory.user
  https://www.googleapis.com/auth/admin.directory.user.security
  https://www.googleapis.com/auth/admin.directory.userschema
  https://www.googleapis.com/auth/admin.reports.audit.readonly
  https://www.googleapis.com/auth/admin.reports.usage.readonly
  https://www.googleapis.com/auth/apps.groups.settings
  https://www.googleapis.com/auth/apps.licensing
  https://www.googleapis.com/auth/classroom.courses
  https://www.googleapis.com/auth/classroom.guardianlinks.students
  https://www.googleapis.com/auth/classroom.profile.emails
  https://www.googleapis.com/auth/classroom.profile.photos
  https://www.googleapis.com/auth/classroom.rosters
  https://www.googleapis.com/auth/cloudprint
  https://www.googleapis.com/auth/ediscovery
  https://www.googleapis.com/auth/plus.me
  https://www.googleapis.com/auth/siteverification
  https://www.googleapis.com/auth/userinfo.email

API Scopes:


--
Dan Rebney
Bethlehem IT

On Thu, Jul 26, 2018 at 10:29 AM, Ross Scroggs <ross.s...@gmail.com> wrote:
Dan,

gam oauth info

Ross

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


--

--
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.
To post to this group, send email to google-apps-manager@googlegroups.com.


--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

Jay Lee

unread,
Jul 26, 2018, 12:05:46 PM7/26/18
to google-ap...@googlegroups.com
I suspect it's because you're trying to remove multiple aliases from the same user via separate, parallel API requests and the multiple updates to the user are conflicting.

Do you have a regular need to do this?

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


--

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


--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, 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.

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

Dan Rebney

unread,
Jul 26, 2018, 2:41:32 PM7/26/18
to google-ap...@googlegroups.com
Yes I do have a regular need to do this. Whenever a person leaves our organization, we transfer their aliases to their replacement. My whole process is largely automated and this seemed like the best way to transfer multiple aliases. I can probably setup a loop to get around this limitation and pass singular commands for each alias if it's not possible to use the gam csv command.


--
Dan Rebney
Bethlehem IT

On Thu, Jul 26, 2018 at 11:05 AM, Jay Lee <jay...@gmail.com> wrote:
I suspect it's because you're trying to remove multiple aliases from the same user via separate, parallel API requests and the multiple updates to the user are conflicting.

Do you have a regular need to do this?

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


--

--
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.
To post to this group, send email to google-apps-manager@googlegroups.com.


--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
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.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

Ross Scroggs

unread,
Jul 26, 2018, 2:55:09 PM7/26/18
to google-ap...@googlegroups.com
Dan,

You can force single-threading for this command.
1) Set the environment variable GAM_THREADS = 1 (however you do that in PowerShell)
2) gam csv $csv gam delete alias ~Aliases 
3) Unset the environment variable 

Ross

On Thu, Jul 26, 2018 at 11:41 AM 'Dan Rebney' via GAM for G Suite <google-ap...@googlegroups.com> wrote:
Yes I do have a regular need to do this. Whenever a person leaves our organization, we transfer their aliases to their replacement. My whole process is largely automated and this seemed like the best way to transfer multiple aliases. I can probably setup a loop to get around this limitation and pass singular commands for each alias if it's not possible to use the gam csv command.


--
Dan Rebney
Bethlehem IT

On Thu, Jul 26, 2018 at 11:05 AM, Jay Lee <jay...@gmail.com> wrote:
I suspect it's because you're trying to remove multiple aliases from the same user via separate, parallel API requests and the multiple updates to the user are conflicting.

Do you have a regular need to do this?

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


--

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


--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, 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.

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

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, 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.

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


--

Dan Rebney

unread,
Jul 26, 2018, 3:07:03 PM7/26/18
to google-ap...@googlegroups.com
Thank you so much Ross, that worked perfectly.

The solution was to have: $env:GAM_THREADS=1
in the script above the gam CSV command then at the end I reverted it back to $env:GAM_THREADS=10 which is the default gam threads.

I tried re-running the gam csv command with commenting out #$env:GAM_THREADS=1 and it failed the same way as before.

Thanks again Ross!


--
Dan Rebney
Bethlehem IT

On Thu, Jul 26, 2018 at 1:54 PM, Ross Scroggs <ross.s...@gmail.com> wrote:
Dan,

You can force single-threading for this command.
1) Set the environment variable GAM_THREADS = 1 (however you do that in PowerShell)
2) gam csv $csv gam delete alias ~Aliases 
3) Unset the environment variable 

Ross
On Thu, Jul 26, 2018 at 11:41 AM 'Dan Rebney' via GAM for G Suite <google-apps-manager@googlegroups.com> wrote:
Yes I do have a regular need to do this. Whenever a person leaves our organization, we transfer their aliases to their replacement. My whole process is largely automated and this seemed like the best way to transfer multiple aliases. I can probably setup a loop to get around this limitation and pass singular commands for each alias if it's not possible to use the gam csv command.


--
Dan Rebney
Bethlehem IT

On Thu, Jul 26, 2018 at 11:05 AM, Jay Lee <jay...@gmail.com> wrote:
I suspect it's because you're trying to remove multiple aliases from the same user via separate, parallel API requests and the multiple updates to the user are conflicting.

Do you have a regular need to do this?

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


--

--
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.
To post to this group, send email to google-apps-manager@googlegroups.com.


--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
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.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

--
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.
To post to this group, send email to google-apps-manager@googlegroups.com.


--

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/OOcM9wgXAAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages