# Converting rule to action, how to deal with user.upn?

**URL:** <https://community.auth0.com/t/converting-rule-to-action-how-to-deal-with-user-upn/147315>\
**Category:** Get Help\
**Tags:** custom-webtasks, deprecations\
**Created:** [September 16, 2024, 7:00pm UTC](https://community.auth0.com/t/converting-rule-to-action-how-to-deal-with-user-upn/147315 "2024-09-16T19:00:34Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [September 30, 2024, 1:10pm UTC](https://community.auth0.com/t/converting-rule-to-action-how-to-deal-with-user-upn/147315/4 "2024-09-30T13:10:43Z")

</div>

Hi @daniel.ekbom

Welcome to the Auth0 Community!

One of the user had a similar problem and solved it with the usage of Management API with `getUser({ id: user.user_id })`

> **[Retrieve Users with the Get Users Endpoint](https://auth0.com/docs/manage-users/user-search/retrieve-users-with-get-users-endpoint)**
>
> Learn how to retrieve lists of users using the get\_users endpoint.

> [@Add the upn to event.user](https://community.auth0.com/t/add-the-upn-to-event-user/60839/4):
>
> I was able to get the upn field by using getUser({ id: user.user\_id }) from using the management api: [https://auth0.github.io/node-auth0/module-management.ManagementClient.html#getUser](https://auth0.github.io/node-auth0/module-management.ManagementClient.html#getUser)

Thanks  
Dawid

---

_[View the full topic](https://community.auth0.com/t/converting-rule-to-action-how-to-deal-with-user-upn/147315)._
