diff --git a/src/main/kotlin/com/hypto/iam/server/service/UsersService.kt b/src/main/kotlin/com/hypto/iam/server/service/UsersService.kt index 97f4e510..251d82ed 100644 --- a/src/main/kotlin/com/hypto/iam/server/service/UsersService.kt +++ b/src/main/kotlin/com/hypto/iam/server/service/UsersService.kt @@ -311,7 +311,7 @@ class UsersServiceImpl : KoinComponent, UsersService { ?: throw EntityNotFoundException("User not found") val userStatus = status?.toUserStatus() - if (userRecord.loginAccess == true) { + if (userRecord.loginAccess == true && org.metadata != null) { val identityGroup = gson.fromJson(org.metadata.data(), IdentityGroup::class.java) identityProvider.updateUser(