# Custom attribute does not work until it is added to "User (default)"

**URL:** <https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369>\
**Category:** API\
**Tags:** dotnet, api\
**Created:** [January 6, 2021, 3:39pm UTC](https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369 "2021-01-06T15:39:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bfakhriloo](https://avatars.discourse-cdn.com/v4/letter/b/57b2e6/32.png) [@bfakhriloo](https://devforum.okta.com/u/bfakhriloo)\
**Post date:** [January 6, 2021, 3:39pm UTC](https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369/1 "2021-01-06T15:39:36Z")

</div>

In the profile editor, I selected “Profile” of an application (Not “User (Default)”), added a custom attribute.

I tried to call the following api:

POST: {{url}}/api/v1/users/{{userid}}

Header: SSWS {{apikey}}

And in the body: {Profile : { “custom\_att”: “value” }}

It did not work until I added the custom attribute to “User (default)”

Can any body help ?

---

<div class="post-metadata">

**Author:** ![erik](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@erik](https://devforum.okta.com/u/erik)\
**Post date:** [January 6, 2021, 8:01pm UTC](https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369/2 "2021-01-06T20:01:36Z")

</div>

Hello,  
When adding a custom attribute to an application profile, that attribute will not show up in the users profile,  
`{{url}}/api/v1/users/{{userid}}`.  
It does show up is the users application profile for that application (if they are assigned it), `{{url}}/api/v1/apps/{{appId}}/users/{{userId}}`

So if a user is assigned to app1 and app2, for each of those apps they will have an associated app profile which would contain any custom attributes specific to that application.

More info can be found [here](https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-user-profile-attributes-main.htm).

---

<div class="post-metadata">

**Author:** ![bfakhriloo](https://avatars.discourse-cdn.com/v4/letter/b/57b2e6/32.png) [@bfakhriloo](https://devforum.okta.com/u/bfakhriloo)\
**Post date:** [January 7, 2021, 9:33am UTC](https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369/3 "2021-01-07T09:33:21Z")

</div>

You mean when calling the post action to update user data, I have to include appid like the following call ?

> [@bfakhriloo](#):
>
> POST: {{url}}/api/v1/apps/{{appid}}/users/{{userid}}

---

<div class="post-metadata">

**Author:** ![gpadma](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@gpadma](https://devforum.okta.com/u/gpadma)\
**Post date:** [January 7, 2021, 6:59pm UTC](https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369/4 "2021-01-07T18:59:33Z")

</div>

That’s right @bfakhriloo. You should be doing a POST to {{url}}/api/v1/apps/{{appid}}/users/{{userid}}.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 26, 2024, 5:29pm UTC](https://devforum.okta.com/t/custom-attribute-does-not-work-until-it-is-added-to-user-default/12369/5 "2024-01-26T17:29:27Z")

</div>

Closed on January 26, 2024, 5:29pm UTC

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