# Locking down audience with password-realm grant

**URL:** <https://community.auth0.com/t/locking-down-audience-with-password-realm-grant/8389>\
**Category:** Get Help\
**Tags:** audience, password-realm\
**Created:** [October 4, 2017, 10:40pm UTC](https://community.auth0.com/t/locking-down-audience-with-password-realm-grant/8389 "2017-10-04T22:40:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iyablochnikov](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@iyablochnikov](https://community.auth0.com/u/iyablochnikov)\
**Post date:** [October 4, 2017, 10:40pm UTC](https://community.auth0.com/t/locking-down-audience-with-password-realm-grant/8389/1 "2017-10-04T22:40:20Z")

</div>

I have two versions of an API: prod and dev. So I defined two separate API’s, clients and connections/realms. I need to use the password-realm grant to support some legacy functionality.

The problem is that if I have valid credentials from the dev realm, I can use the dev client and request a token for the prod audience. Then I can use that access\_token to make requests to the prod API and the token will be validated.

How can I lock down the audience so that only users from the prod realm, using the prod client can request tokens for the prod audience?

When I go to API settings \> Non-Interactive Clients I disable all the clients but that doesn’t have any effect on the password-realm grant.

---

<div class="post-metadata">

**Author:** ![iyablochnikov](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@iyablochnikov](https://community.auth0.com/u/iyablochnikov)\
**Post date:** [October 4, 2017, 11:05pm UTC](https://community.auth0.com/t/locking-down-audience-with-password-realm-grant/8389/2 "2017-10-04T23:05:53Z")

</div>

I’m thinking of creating a Rule that will check the requested audience against the connection used to authenticate the user and if there’s a mismatch, denying the request. I really thought there was some out of the box solution though. It feels like I’m misunderstanding something and working against the grain.

---

<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 2, 2018, 5:56am UTC](https://community.auth0.com/t/locking-down-audience-with-password-realm-grant/8389/3 "2018-03-02T05:56:49Z")

</div>


