GAM-team / GAM

command line management for Google Workspace
https://github.com/GAM-team/GAM/wiki
Apache License 2.0
3.54k stars 473 forks source link

GAM doesn't list all active aliases in particular situation #1693

Closed meksone closed 1 month ago

meksone commented 3 months ago

We have discovered a weird situation on Google side. We want to move an already registered domain from one Google console to another, so we proceeded to rename all users using another domain (OLD.DOMAIN.com), promote OLD.DOMAIN.com as primary and the remove the DOMAIN.com from console.

We have triple checked with GAM to see if we left some users/alias/group with the old domain name, but everything seemed fine. Anyway, we can't proceed to remove domain from console because it says that some user/alias was already in use.

After checking with Google Support, we have found that an user has a illegal alias: @domain.com (yes: the username part was a " " ). We have removed that alias, then the domain has removed successfully from console.

It's really difficult to replicate that situation but I want to tell you that this situation can happen (at least, it happens yessterday to us!) and, if possible, to think a possible workaround to list such illegal aliases using GAM. Yesterday, the domain was relatively small (112 users) but if this happens on a big domain with thousand of users, it can be a pain to find the blocking alias.

Thanks for your precious work :)

jay0lee commented 1 month ago

GAM can only show aliases that Google servers report via the APIs. If the APIs aren't returning such "invalid" aliases there's not much GAM can do here. This sounds like a bug / weird config issue on Google's side that is causing it to fail to return the alias.

Closing for now but this closed issue will remain publicly visible should someone else encounter a similar issue.