Skip to content

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

@stashev

Description

@stashev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions