# First login fail

**URL:** <https://community.auth0.com/t/first-login-fail/78726>\
**Category:** Get Help\
**Tags:** login\
**Created:** [February 22, 2022, 4:26pm UTC](https://community.auth0.com/t/first-login-fail/78726 "2022-02-22T16:26:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roy2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/roy2/32/12835_2.png) [@roy2](https://community.auth0.com/u/roy2)\
**Post date:** [February 22, 2022, 4:26pm UTC](https://community.auth0.com/t/first-login-fail/78726/1 "2022-02-22T16:26:01Z")

</div>

Hi,  
After manually creating a new user the following always happens only on the first login try:

```auto
curl --request POST \
  --url '...' \
  --header 'content-type: application/json' \
  --data '{"grant_type":"password", "client_id":"...", "client_secret":"...", "username":"dummy@example.com", "password":"...", "audience":"..."}'

```

Response:

```auto
{"error":"access_denied","error_description":"Cannot read property 'prompt' of undefined"}

```

Second time for the SAME curl command works!

ANy ideas???

---

<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:** [February 22, 2022, 8:33pm UTC](https://community.auth0.com/t/first-login-fail/78726/3 "2022-02-22T20:33:06Z")

</div>

Hi @roy2,

Thanks for reaching out to the Auth0 Community!

After observing your CURL command, I noticed that your header should be URL encoded.

For [example](https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-resource-owner-password-flow#example-post-to-token-url):

```auto
curl --request POST \
  --url 'https://YOUR_DOMAIN/oauth/token' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=password \
  --data username=user@example.com \
  --data password=pwd \
  --data audience=YOUR_API_IDENTIFIER \
  --data scope=read:sample \
  --data 'client_id=YOUR_CLIENT_ID' \
  --data client_secret=YOUR_CLIENT_SECRET

```

Regarding the response, it can happen when you have a Rule or Action checking for a condition that includes the “prompt” property.

If this is the case, you will have to adjust your Rule/Action in the auth pipeline to accommodate this check.

Hoped this helps!

Please let me know if you have any further questions.

Thank you.

---

<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:** [March 9, 2022, 8:33pm UTC](https://community.auth0.com/t/first-login-fail/78726/4 "2022-03-09T20:33:08Z")

</div>

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