# Auth0 Action Migration Issues

**URL:** <https://community.auth0.com/t/auth0-action-migration-issues/110513>\
**Category:** Get Help\
**Tags:** logs, management-api\
**Created:** [July 4, 2023, 7:08am UTC](https://community.auth0.com/t/auth0-action-migration-issues/110513 "2023-07-04T07:08:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shieng.ng](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@shieng.ng](https://community.auth0.com/u/shieng.ng)\
**Post date:** [July 4, 2023, 7:08am UTC](https://community.auth0.com/t/auth0-action-migration-issues/110513/1 "2023-07-04T07:08:08Z")

</div>

```auto
    let options = {
      method: 'POST',
      uri: RH_API_URL + '/middleware/auth0/rules',
      headers: { Authorization: AUTH_TOKEN },
      body: { user, context },
      json: true
    };

```

During migration from rule to action body: { user, context }, this code having issue.  
how to convert this and we can get the user and context from backend when we get the body from action.

body: { event }, I write like this but cannot work!!!

There are very less documents and videos related to migration from rule to action!!! Even the videos related to Action features also very less

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [July 5, 2023, 2:20pm UTC](https://community.auth0.com/t/auth0-action-migration-issues/110513/3 "2023-07-05T14:20:36Z")

</div>

Hi @shieng.ng,

I understand you are having questions about the Rules to Actions migration.

For this code snippet you provided, you will need to replace the `user` and `context` objects.

- The `user` object will map most closely to Action’s `event.user`
- The `context` object will map to multiple objects i.e. `event.tenant`, `event.client`, `event.connection`, `event.request` and more.

I would suggest looking at what is contained in the [context object,](https://auth0.com/docs/customize/rules/context-object) and what your API is requiring, then mapping it to the correct Actions [event object](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/event-object).

---

<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:** [July 19, 2023, 2:20pm UTC](https://community.auth0.com/t/auth0-action-migration-issues/110513/4 "2023-07-19T14:20:36Z")

</div>

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