How to UPDATE users and how to modify custom attribute values for GROUPS with the okta API?

Greetings,

1.) What API can I use to update users? I want to be able to change attribute values, including custom attributes.

2.) How can I modify custom attributes associated to a group?

I see this API to modify groups, but I can only change the Name and Description.

Documentation for updating users: https://developer.okta.com/docs/api/resources/users#update-user

For users at least, you can include custom attributes using the variable name in the profile. For example, your post body could be:

{
        "profile": {
            "custom_attribute": "Updated Value"
        }
}

I don’t know of any way to do custom attributes, API or otherwise, for groups.

Thank you Paul, I’m not sure how I missed update user, that one is working as you mentioned.

Regarding the group values, I might not be using the correct terms, the desire is to have attributes set at a group level rather than a user level.

In the Okta UI I am able to define what appears to be “group level” custom attributes for each app assignment, I am able to fetch these with this Okta API:

https://developer.okta.com/docs/api/resources/apps#get-assigned-group-for-application

Unclear on how I can set these values via the API

Screenshots:

I think I figured it out, this appears to be working.

I used this API (Assign Group To App):

https://developer.okta.com/docs/api/resources/apps#assign-group-to-application

And then in the body of the request I can specify the attribute values:

{
 "profile": {
        "videa_policy_delegations": null,
        "testApp2Attribute": "2341234",
        "videa_policy": "weqrqwer"
    }

}

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.