# Include claim only if it has value - User claim evaluation failure error

**URL:** <https://devforum.okta.com/t/include-claim-only-if-it-has-value-user-claim-evaluation-failure-error/12707>\
**Category:** Questions\
**Created:** [January 31, 2021, 12:55am UTC](https://devforum.okta.com/t/include-claim-only-if-it-has-value-user-claim-evaluation-failure-error/12707 "2021-01-31T00:55:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsd](https://avatars.discourse-cdn.com/v4/letter/n/85e7bf/32.png) [@nsd](https://devforum.okta.com/u/nsd)\
**Post date:** [January 31, 2021, 12:55am UTC](https://devforum.okta.com/t/include-claim-only-if-it-has-value-user-claim-evaluation-failure-error/12707/1 "2021-01-31T00:55:55Z")

</div>

Hello,

I created a custom user profile field and this is not mandaoty for all users. I am include this in list of claims as shown below. I see this claim when it has value, but I see “User claim evaluation failure” error in the system log.

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/1/10660d53730b78df81bc67d4ef4a137ee1b3e77b.png)

Please let me know if I am missing anything.

Thanks for your time!

---

<div class="post-metadata">

**Author:** ![warren](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@warren](https://devforum.okta.com/u/warren)\
**Post date:** [February 2, 2021, 6:23pm UTC](https://devforum.okta.com/t/include-claim-only-if-it-has-value-user-claim-evaluation-failure-error/12707/2 "2021-02-02T18:23:25Z")

</div>

The `User claim evaluation failure` is likely just a warning message since Okta is not expecting null values. A potential workaround is to add a check to the expression such as `(user.empId != null) ? user.empId : ''`

---

<div class="post-metadata">

**Author:** ![nsd](https://avatars.discourse-cdn.com/v4/letter/n/85e7bf/32.png) [@nsd](https://devforum.okta.com/u/nsd)\
**Post date:** [February 3, 2021, 6:03am UTC](https://devforum.okta.com/t/include-claim-only-if-it-has-value-user-claim-evaluation-failure-error/12707/3 "2021-02-03T06:03:11Z")

</div>

Thank you for the clarification. These failures/warnings are counted as failed logins on the dashboard and that is creating the confusion.

---

<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:** [February 4, 2021, 6:03am UTC](https://devforum.okta.com/t/include-claim-only-if-it-has-value-user-claim-evaluation-failure-error/12707/4 "2021-02-04T06:03:49Z")

</div>

Closed on February 4, 2021, 6:03am UTC

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