# Adding multiple user attributes as a single claim to a scope

**URL:** <https://devforum.okta.com/t/adding-multiple-user-attributes-as-a-single-claim-to-a-scope/11910>\
**Category:** Questions\
**Created:** [November 28, 2020, 5:11pm UTC](https://devforum.okta.com/t/adding-multiple-user-attributes-as-a-single-claim-to-a-scope/11910 "2020-11-28T17:11:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![angela](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@angela](https://devforum.okta.com/u/angela)\
**Post date:** [November 28, 2020, 5:11pm UTC](https://devforum.okta.com/t/adding-multiple-user-attributes-as-a-single-claim-to-a-scope/11910/1 "2020-11-28T17:11:16Z")

</div>

I created a scope called userAttributes  
I created a custom claim called user\_attributes

- Type = Id tken based and always
- value type = expression
- express = Arrays.add({user.jobTitle, user.displayName, user.email, user.login})
- include in scope userAttributes

when I do a preview of an id token on my client with openid and userAttributes indicated as scope. The claim doesn’t appear in the claims list

if I take the example Arrays.add({10, 20, 30}, 40) from the following page

> **[Expression Language Overview | Okta Developer](https://developer.okta.com/docs/reference/okta-expression-language/)**

The claim doesn’t appear in the claims list.

if I do just _one_ attribute user.jobTitle it will show the claim user\_attributes with a value of Developer.

I do not wish to create an individual claim for every single attribute I want out. How can I can a list of user attributes out as an array for one claim?

Thanks,

Angela

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [December 3, 2020, 12:20am UTC](https://devforum.okta.com/t/adding-multiple-user-attributes-as-a-single-claim-to-a-scope/11910/2 "2020-12-03T00:20:09Z")

</div>

Hi @angela! Looks like we don’t have a way to do this at the moment. Although, the profile and email scope already includes more claims outside of openid - see 2.4. Scope Values in [https://openid.net/specs/openid-connect-basic-1\_0.html#StandardClaims](https://openid.net/specs/openid-connect-basic-1_0.html#StandardClaims) and [https://developer.okta.com/docs/reference/api/oidc/#scope-dependent-claims-not-always-returned](https://developer.okta.com/docs/reference/api/oidc/#scope-dependent-claims-not-always-returned).

For custom attributes, you can only list them as individual claims and then tie them to a specific scope. However, if you want to arrange them a certain way i.e., an array, then we may not cover this use case. I suggest adding this to our Ideas page [https://support.okta.com/help/s/article/Okta-Ideas-Overview-FAQ](https://support.okta.com/help/s/article/Okta-Ideas-Overview-FAQ).

---

<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 19, 2024, 12:56am UTC](https://devforum.okta.com/t/adding-multiple-user-attributes-as-a-single-claim-to-a-scope/11910/3 "2024-01-19T00:56:21Z")

</div>

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