Can't update primaryemail - entity already exists - but it doesn't!

731 views
Skip to first unread message

Kim Nilsson

unread,
Aug 13, 2021, 5:42:20 AM8/13/21
to GAM for Google Workspace
I have a user which incorrectly got a double first name in their email address, so I'm trying to make it shorter.

$ gamo whatis firstextra.last@mydomain
firstextra.last@mydomain is a user

The shorter address doesn't exist.

$ gamo whatis first.last@mydomain
first.last@mydomain is not a user...
first.last@mydomain is not a user alias...
first.last@mydomain is not a group...
first.last@mydomain is not a group alias...

ERROR:  first.last@mydomain   doesn't seem to exist!

But running the update it fails, saying the entity exists.

Both GAM and GAMADV-XTD3 gives the same error.

GAM
$ gamo update user firstextra.last@mydomain primaryemail first.last@mydomain
updating user firstextra.last@mydomain ...

ERROR: 409: Entity already exists. - duplicate

GAMADV-XTD3
$ gam update user firstextra.last@mydomain primaryemail first.last@mydomain
User:  firstextra.last@mydomain, User:  first.last@mydomain, Update Failed: Entity already exists.

Now, I do have a user with a similar primaryemail, but not the same.
So it should not interfere. Seems it does.

$ gamo whatis vfu.first.last@mydomain
vfu.first.last@mydomain is a user

$ gamo version
GAM 6.07

$ gam version
GAMADV-XTD3 6.07.07

Jay Lee

unread,
Aug 13, 2021, 6:06:50 AM8/13/21
to google-ap...@googlegroups.com
Try this:

1. Create the new address as a group.
2. Delete the group.
3. Now try renaming the user to the new address again.

If that works for you I'll explain the why.

Jay

--
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/3977360e-ebe5-4146-8cbe-b3a45d586763n%40googlegroups.com.

Kim Nilsson

unread,
Aug 13, 2021, 6:31:45 AM8/13/21
to GAM for Google Workspace
That would have been awesome. Sadly, it didn't work.

$ gam create group first.last@mydomain
Group:  first.last@mydomain, Create Failed: Duplicate, Email Address: first.last@mydomain

$ gamo create group first.last@mydomain
Creating group first.last@mydomain

ERROR: 409: Entity already exists. - duplicate

$ gamo delete group first.last@mydomain
Deleting group first.last@mydomain

ERROR: 403: Not Authorized to access this resource/api - forbidden

$ gam delete group first.last@mydomain
Group:  first.last@mydomain, Does not exist

Jay Lee

unread,
Aug 13, 2021, 6:33:43 AM8/13/21
to google-ap...@googlegroups.com
Can you try crafting and deleting the address as a user?

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

Kim Nilsson

unread,
Aug 13, 2021, 6:36:39 AM8/13/21
to GAM for Google Workspace
OMG! I was allowed to create it as an alias!

$ gam create alias first.last@mydomain user firstextra.last@mydomain
User Alias: first.last@mydomain , User:  firstextra.last@mydomain, Created

$ gam whatis first.last@mydomain
User Alias: first.last@mydomain
  User Email: firstextra.last@mydomain
  Unique ID: 123456789

$ gamo whatis first.last@mydomain
first.last@mydomain is a user alias

 Alias Email: first.last@mydomain
 User Email: firstextra.last@mydomain
 Unique ID: 123456789

I will test deleting that alias now, and try to re-use the address then.

Kim Nilsson

unread,
Aug 13, 2021, 6:39:58 AM8/13/21
to GAM for Google Workspace
YEEEEEEEEEEEEEEES!
Creating as alias and then deleting that alias fixed it!

$ gamo delete alias first.last@mydomain
Deleting alias first.last@mydomain

$ gamo whatis first.last@mydomain
first.last@mydomain is not a user...
first.last@mydomain is not a user alias...
first.last@mydomain is not a group...
first.last@mydomain is not a group alias...

ERROR:  first.last@mydomain doesn't seem to exist!


Kim Nilsson

unread,
Aug 13, 2021, 6:46:22 AM8/13/21
to GAM for Google Workspace
Thanks for the suggestions, Jay.
I didn't see that you said to try create user, because I was busy testing create alias.

So, is there a point to running the explanation now? I now have a workaround, but if the explanation is enlightening, then please explain.

Jay Lee

unread,
Aug 13, 2021, 6:50:02 AM8/13/21
to google-ap...@googlegroups.com
The address was a visitor account:


When you create the address as a real Workspace user or alias it takes over the address namespace but there's an issue doing the same takeover for groups and user renames right now.

Jay

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

Kim Nilsson

unread,
Aug 13, 2021, 6:59:33 AM8/13/21
to GAM for Google Workspace
Thank you. That I had heard of, and this was the first time it interfered for me.
Reply all
Reply to author
Forward
0 new messages