K
Kinde•3mo ago
Hundrick

Bug in UsersResponseUsersInner class with missing "full_name" field

Hello guys, I'm currently working on a Spring Boot project with Kinde. I'm trying to implement the feature to get all my users with the UsersApi using the kinde management api. The problem is that when I execute usersApi.getUsers(), it uses the UsersResponse type, which in turn uses the UsersResponseUsersInner type. In the UsersResponseUsersInner class, the "full_name" field is missing, and because of the implementation of this class, this error is triggered: Error retrieving Kinde users: The field full_name in the JSON string is not defined in the UsersResponseUsersInner properties. JSON: {"id":"random_id","email":"random_email","full_name":"random_full_name","last_name":"random_last_name","created_on":"2025-06-09T21:26:14.471781+00:00","first_name":"random_first_name","is_suspended":false,"last_signed_in":"2025-06-09T21:26:14.93068+00:00","total_sign_ins":1,"failed_sign_ins":0} I'm using this version :
<!-- Kinde Management API -->
<dependency>
<groupId>com.kinde</groupId>
<artifactId>kinde-management</artifactId>
<version>2.0.2</version>
</dependency>
<!-- Kinde Management API -->
<dependency>
<groupId>com.kinde</groupId>
<artifactId>kinde-management</artifactId>
<version>2.0.2</version>
</dependency>
Can you help me with this problem please ?
8 Replies
Roshan
Roshan•3mo ago
Hi,
Thanks for reaching out. I understand the issue and will raise it with the internal team. In the meantime, here are some recommended workarounds: 1. Ignore unknown fields: Configure your object mapper to ignore unknown properties. This will allow deserialization to succeed even if full_name is not explicitly defined. You may also consider implementing a custom deserializer that ignores unknown fields. 2. Use separate name fields: Instead of relying on full_name, construct the full name using the first_name and last_name fields. Let me know if this helps.
Thanks!
Hundrick
HundrickOP•3mo ago
Thank you for your quick response ! Ok I'll try the first solution but I think I'll need some help to implement it. I'm still a beginner with Kinde 😅 ... Here what I have now.
Roshan
Roshan•3mo ago
Thanks for the follow-up.

To fix this, please configure Jackson to ignore unknown fields globally:
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JacksonConfig {

@Bean
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return mapper;
}
}
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JacksonConfig {

@Bean
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return mapper;
}
}

This ensures the missing full_name field (and any other unknown fields in the future) won't break deserialization. Then You can then safely build the full name yourself using:
UsersResponse users = usersApi.getUsers();
String fullName = user.getFirstName() + " " + user.getLastName();
UsersResponse users = usersApi.getUsers();
String fullName = user.getFirstName() + " " + user.getLastName();

Let me know if this helps, Thanks
Hundrick
HundrickOP•3mo ago
I created the JacksonConfig class
/**
* @ Author: Harry
* @ Create Time: 2025-06-30
* @ Modified by: Harry
* @ Modified time: 2025-06-30
* @ Description: Jackson configuration to handle Kinde API deserialization issues.
*/

package ca.trolet.datareplicationservice.config;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class JacksonConfig {

@Bean
@Primary
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();

// Ignore unknown properties to handle API schema mismatches
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

// Handle empty strings as null values
mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);

// Register JavaTimeModule for proper date/time handling
mapper.registerModule(new JavaTimeModule());

return mapper;
}
}
/**
* @ Author: Harry
* @ Create Time: 2025-06-30
* @ Modified by: Harry
* @ Modified time: 2025-06-30
* @ Description: Jackson configuration to handle Kinde API deserialization issues.
*/

package ca.trolet.datareplicationservice.config;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class JacksonConfig {

@Bean
@Primary
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();

// Ignore unknown properties to handle API schema mismatches
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

// Handle empty strings as null values
mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);

// Register JavaTimeModule for proper date/time handling
mapper.registerModule(new JavaTimeModule());

return mapper;
}
}
But the error is still here : /
Hundrick
HundrickOP•3mo ago
Here's the full error
Hundrick
HundrickOP•3mo ago
Oh Claude Sonnet 4 found this solution ! It's not very clean but it's work haha
Roshan
Roshan•3mo ago
That’s great to hear, glad you were able to sort it out on your end! Thanks for keeping me updated. If you run into anything else or need support implementing other Kinde features, feel free to reach out anytime.

Thanks
Hundrick
HundrickOP•3mo ago
Tank you very much for your help !

Did you find this page helpful?