okta-sdk-java icon indicating copy to clipboard operation
okta-sdk-java copied to clipboard

Group fetched with SDK does not include custom profile attributes (profile is empty or missing)

Open stashev opened this issue 5 months ago • 1 comments

Describe the bug?

Environment

  • Okta Java SDK version: 23.0.1
  • Java version: 21

Current Behavior

When retrieving a group using GroupApi.getGroup(groupId) , the resulting Group object's profile does not include custom attributes defined in the Okta group schema.
This occurs regardless of whether the expand=profile additional header is set, and happens even when the custom attributes are present and visible in the Okta Admin UI.

Example

Group group = groupApi.getGroup(groupId);
GroupProfile profile = group.getProfile();
Map<String, Object> customAttrs = profile.getAdditionalProperties();
System.out.println(customAttrs); // --> {}

What is expected to happen?

The Group object should contain all custom attributes defined in the group schema under group.getProfile().getAdditionalProperties() (or similar), matching the actual profile as shown in the Okta Admin UI.

What is the actual behavior?

Steps To Reproduce 1. Create a group schema in Okta with a custom attribute (e.g., MaxUsersCount). 2. Create a group using the Okta SDK, setting all custom attributes. 3. Fetch the group using groupApi.getGroup(groupId) (with and without expand=profile). 4. Observe that the profile/custom attributes are missing in the returned Group object.

Reproduction Steps?

Steps To Reproduce 1. Create a group schema in Okta with a custom attribute (e.g., MaxUsersCount). 2. Create a group using the Okta SDK, setting all custom attributes. 3. Fetch the group using groupApi.getGroup(groupId) (with and without expand=profile). 4. Observe that the profile/custom attributes are missing in the returned Group object.

Additional Information?

No response

Java Version

21

SDK Version

23.0.1

OS version

No response

stashev avatar Jul 15 '25 23:07 stashev

Any plans to resolve this issue?

Marek26 avatar Aug 25 '25 05:08 Marek26