diff --git a/Keas.Core/Services/IUpdateFromIamService.cs b/Keas.Core/Services/IUpdateFromIamService.cs index 8fcc3628d..5e4aa2e5f 100644 --- a/Keas.Core/Services/IUpdateFromIamService.cs +++ b/Keas.Core/Services/IUpdateFromIamService.cs @@ -55,7 +55,8 @@ public async Task UpdateUsersFromLastModifiedDateInIam(DateTime modifiedAft foreach (var user in users) { var ietData = result.ResponseData.Results.Where(a => a.IamId == user.Iam).FirstOrDefault(); - if (ietData != null) + //Possible to get null data back for a user. Probably because they are going away + if (ietData != null && !string.IsNullOrWhiteSpace(ietData.DFirstName) && !string.IsNullOrWhiteSpace(ietData.DLastName)) { if (user.FirstName != ietData.DFirstName || user.LastName != ietData.DLastName) { @@ -87,6 +88,7 @@ public async Task UpdateUsersFromLastModifiedDateInIam(DateTime modifiedAft catch (Exception ex) { Log.Error("Update IAM by Modified Date - Getting List of Users to Update.", ex); + Log.Error($"Update IAM by Modified Date - Exception Message: {ex.Message} -- {ex.InnerException.Message}"); } return count; } @@ -119,7 +121,7 @@ public async Task UpdateAllUsersFromIam() if (result != null && result.ResponseData.Results.Length > 0) { var ietData = result.ResponseData.Results.Where(a => a.IamId == user.Iam).FirstOrDefault(); - if (ietData == null) + if (ietData == null || string.IsNullOrWhiteSpace(ietData.DFirstName) || string.IsNullOrWhiteSpace(ietData.DLastName)) { continue; } diff --git a/Keas.Jobs.LivedName/Keas.Jobs.LivedName.csproj b/Keas.Jobs.LivedName/Keas.Jobs.LivedName.csproj index 9ee87f601..0bafba673 100644 --- a/Keas.Jobs.LivedName/Keas.Jobs.LivedName.csproj +++ b/Keas.Jobs.LivedName/Keas.Jobs.LivedName.csproj @@ -6,6 +6,7 @@ 93abda06-2870-4006-81e8-1eecba3d977c enable enable + 1.0.0.1