# Convert rules to action help

**URL:** <https://community.auth0.com/t/convert-rules-to-action-help/109394>\
**Category:** Get Help\
**Tags:** custom-webtasks, deprecations\
**Created:** [June 16, 2023, 1:01pm UTC](https://community.auth0.com/t/convert-rules-to-action-help/109394 "2023-06-16T13:01:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam.bowler](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adam.bowler/32/45078_2.png) [@adam.bowler](https://community.auth0.com/u/adam.bowler)\
**Post date:** [June 16, 2023, 1:01pm UTC](https://community.auth0.com/t/convert-rules-to-action-help/109394/1 "2023-06-16T13:01:52Z")

</div>

I’m trying to convert this rule

```auto
function (user, context, callback) {
  user.email = user.email || user.upn;
  callback(null, user, context);
}

```

But I can’t figure out how to get the upn in an action, can someone help?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [June 16, 2023, 6:31pm UTC](https://community.auth0.com/t/convert-rules-to-action-help/109394/3 "2023-06-16T18:31:46Z")

</div>

Hi @adam.bowler,

Thanks for reaching out to the Auth0 Community!

Unfortunately, the `user.upn` value cannot be called since Top-level IdP user attributes are not available in Actions yet.

This is mentioned in our [Actions Limitations](https://auth0.com/docs/customize/actions/limitations#:~:text=Top%2Dlevel%20event.user%20attributes%20added%20by%20an%20external%20IdP%20or%20custom%20database%20script) documentation.

For now, we recommend that you continue using your Rule until we reach feature parity with Actions which is coming soon!

Please let us know if you have any additional questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 30, 2023, 6:32pm UTC](https://community.auth0.com/t/convert-rules-to-action-help/109394/4 "2023-06-30T18:32:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [October 18, 2024, 8:50am UTC](https://community.auth0.com/t/convert-rules-to-action-help/109394/5 "2024-10-18T08:50:01Z")

</div>

Hi @adam.bowler

Welcome to the Auth0 Community!

We’ve updated our Knowledge Solutions with chapter about Adding Claims with Action with a similar fashion to how Rules worked. You can find it here → [Azure AD Integration not Providing the User Email](https://community.auth0.com/t/azure-ad-integration-not-providing-the-user-email/88924#p-236269-add-claims-using-actions-6)

Thanks  
Dawid
