Search code examples
c#google-directory-api

Cannot create new GSuite accounts w/ Alias as of 2021-11


I'm trying to create users in Google directory using the Google Directory APIs, specifically Google.Apis.Admin.Directory.directory_v1. If I add a user with an alias, it will fail with an error of "If-Match - Error with format of alias" but if I create the user first and then add the alias afterwards, it succeeds.

The really strange thing is that this used to work. Starting somewhere around November 2021, code that I've had working for a few years stopped working.


Solution

  • I would recommend keeping user and alias creation as two separate API calls. That way if one fails you know whether it's the user create and primary address that's the problem or the alias address which is a problem.

    Having said that, can you show your full API call including the POST url and body?