# Resource Owner Password Flow - Rules are not executed

**URL:** <https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322>\
**Category:** Get Help\
**Tags:** rules, oauth2\
**Created:** [June 30, 2021, 12:03pm UTC](https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322 "2021-06-30T12:03:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian.b](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/christian.b/32/12821_2.png) [@christian.b](https://community.auth0.com/u/christian.b)\
**Post date:** [June 30, 2021, 12:03pm UTC](https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322/1 "2021-06-30T12:03:40Z")

</div>

Hello,

I’m currently trying to implement the Resource Owner Password Flow for an application that cannot be redirected to the Auth0 login page. What I’m doing is: Taking username, password and calling the oauth/token endpoint as described in documentation. I am able to retrieve an access\_token, but it’s not containing the same information as the tokens of our other applications (which use redirect).

In the documentation it says:

> Rules will run for the Resource Owner Password Flow (including the Realm extension grant).

We have a set of rules, which will do things like adding user\_metadata, permissions or roles to the token. To me it seems, that those rules are not executed when I’m calling the /oauth/token endpoint. Am I missing something? Appreciate any kind of input.

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [June 30, 2021, 2:55pm UTC](https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322/2 "2021-06-30T14:55:50Z")

</div>

Hi @christian.b

They should be executed. Are you using the realtime webtask logs extension? If not, enable that, put some console.logs in and figure out what is going on.

Make sure you are looking at the proper Auth0 tenant. When this happens to me, it usually means I am authenticating against a different tenant than I think I am.

John

---

<div class="post-metadata">

**Author:** ![christian.b](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/christian.b/32/12821_2.png) [@christian.b](https://community.auth0.com/u/christian.b)\
**Post date:** [July 1, 2021, 8:42am UTC](https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322/3 "2021-07-01T08:42:34Z")

</div>

Hi @john.gateley

It looks like I have fixed that issue by accident today. I noticed, that the access\_token I received was an opaque token and only the id\_token was a JWT. Then I cam across this FAQ page: [Why is my access token not a JWT? (Opaque Token)](https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028)

After calling the endpoint with the audience parameter, both tokens were returned as JWT’s and the access\_token includes all the information I would expect.

Best,  
Christian

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 1, 2021, 10:18am UTC](https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322/4 "2021-07-01T10:18:31Z")

</div>

Perfect! Glad to hear that!

---

<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 16, 2021, 10:18am UTC](https://community.auth0.com/t/resource-owner-password-flow-rules-are-not-executed/65322/5 "2021-07-16T10:18:57Z")

</div>

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