Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to set UserProfile.secondEmail to null #1612

Open
srrentgeral opened this issue Mar 20, 2025 · 1 comment
Open

Not able to set UserProfile.secondEmail to null #1612

srrentgeral opened this issue Mar 20, 2025 · 1 comment
Assignees

Comments

@srrentgeral
Copy link

Describe the bug?

Setting UserProfile.secondEmail = null does not remove or update the field when using the Java Okta SDK (okta-sdk-api version 21.0.0). Other updates with non-null values work as expected, but attempting to set secondEmail to null does not take effect.

Use the Okta Java SDK (version 21.0.0) to update a user’s profile.
Set UserProfile.secondEmail to null.
Call the API using:
com.okta.sdk.resource.api.UserApi#updateUser(java.lang.String, com.okta.sdk.resource.model.UpdateUserRequest, java.lang.Boolean)

SecondEmail is not removed or updated in the Okta user profile.

Calling update on Okta api directly with below request works but not with java sdk
{
"profile": {
"secondEmail": null
}
}

What is expected to happen?

Setting UserProfile.secondEmail = null should remove the field or set it to null in the Okta user profile.

What is the actual behavior?

The API request is sent with UserProfile.secondEmail=null, but secondEmail remains unchanged.

Reproduction Steps?

  • Use the Okta Java SDK (version 21.0.0) to update a user’s profile.
  • Set UserProfile.secondEmail to null.
  • Call the API using:
    com.okta.sdk.resource.api.UserApi#updateUser(java.lang.String, com.okta.sdk.resource.model.UpdateUserRequest, java.lang.Boolean)
    SecondEmail is not removed or updated in the Okta user profile.

Additional Information?

No response

Java Version

17.0.9

SDK Version

21.0.0

OS version

No response

@prachi-okta prachi-okta self-assigned this Mar 20, 2025
@prachi-okta
Copy link
Contributor

@srrentgeral Thank you for reporting this! I will be taking a look at this and will update.

@srrentgeral srrentgeral changed the title Not ale to set UserProfile.secondEmail to null Not able to set UserProfile.secondEmail to null Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants