Skip to content

Commit

Permalink
Merge pull request #41 from rabobank/MINOR_ERROR_HANDLING_IMPROVEMENT
Browse files Browse the repository at this point in the history
minor error handling improvement for empty UPN's
  • Loading branch information
metskem authored Jan 23, 2024
2 parents 1c15d2f + 91965dc commit 5cff29f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/azureAD_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (m *DefaultManager) SyncAzureADUsers(roleUsers *role.RoleUsers, usersInput
userID := userToUse.Upn
uaaUser := m.UAAUsers.GetByNameAndOrigin(userID, origin)
lo.G.Debugf("SyncAzureADUsers: Processing user: %s", userID)
if uaaUser == nil {
if uaaUser == nil && userToUse.Upn != "" {
lo.G.Debugf("AAD User %s doesn't exist in cloud foundry, so creating user", userToUse.Upn)
if userGUID, err := m.UAAMgr.CreateExternalUser(userToUse.Upn, userToUse.Upn, userToUse.Upn, m.AzureADConfig.UserOrigin); err != nil {
lo.G.Errorf("Unable to create AAD user %s with error %s", userToUse.Upn, err.Error())
Expand Down

0 comments on commit 5cff29f

Please sign in to comment.