Google Çalışma Alanı için toplu olarak e-posta takma adları oluşturulamıyor

0

Soru

Kullanıcıları toplu olarak oluşturan ve aynı zamanda bir takma ad oluşturan.net'te yerleşik bir komut dosyam var.

Kullanıcılar Google Yönetici konsolu'nda oluşturulur, ancak e-posta takma adı bilgilerini tamamlamıyor gibi görünüyor. Yönetici konsolunu kontrol ettikten sonra alternatif e-posta alanı boştur

Bu hata iletisidir:

Google.API.İstemler.RequestError Kullanıcı oluşturma tamamlanmadı. [412] Hatalar[Mesaj [Kullanıcı oluşturma tamamlanmadı.] Konum[If - Match-header] Sebep [conditionNotMet] Etki Alanı [global]]]

Bu benim senaryom :

// create new Gmail user                    
Google.Apis.Admin.Directory.directory_v1.Data.User newuserbody = new Google.Apis.Admin.Directory.directory_v1.Data.User();
UserName newusername = new UserName();
newuserbody.PrimaryEmail = userEmail;
newusername.GivenName = sFirst;
newusername.FamilyName = sLast;
newuserbody.Name = newusername;
newuserbody.Password = sPass;

Google.Apis.Admin.Directory.directory_v1.Data.User
user = service.Users.Insert(newuserbody).Execute();
user = null;
}

catch (Exception e) {
  LogMessage("CreateGoogleEmailApps", "Error", String.Format("Google user [{0}] could not be created at this time with error: {1}", sUN, e.Message));
}

try {
  // nickname attempt
  Alias newalias = new Alias();
  newalias.AliasValue = string.Format("username-{0}@{1}", sPass, ASAS_Create.Properties.Settings.Default.G_DOMAIN);
  Alias useralias = service.Users.Aliases.Insert(newalias, userEmail).Execute();
  newalias = null;
} catch (Exception e) {
  //LogMessage("CreateGoogleEmailApps", "Error", String.Format("Google user [{0}]'s alias could not be created at this time.", sUN));                    
  LogMessage("CreateGoogleAliasApps", "Error", string.Format("Google Alias Error for user [{0}] with error message[{1}].", sUN, e.Message));
}
.net c# google-directory-api
2021-11-24 00:51:45
1

En iyi cevabı

0

Bazı testlerden sonra neler olduğunu buldum.

Komut dosyası, Google'a dakika başına kotayı aşan istekler yapıyordu ve bu nedenle kullanıcı oluşturuldu ancak e-posta takma adı oluşturulmadı.

Üstel geri tepmeyi uyguladıktan sonra https://cloud.google.com/iot/docs/how-tos/exponential-backoff sorun çözüldü

2021-12-09 20:28:29

Diğer dillerde

Bu sayfa diğer dillerde

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................