# Deny users with certain roles at login

**URL:** <https://community.auth0.com/t/deny-users-with-certain-roles-at-login/91118>\
**Category:** Get Help\
**Tags:** login\
**Created:** [September 22, 2022, 10:07am UTC](https://community.auth0.com/t/deny-users-with-certain-roles-at-login/91118 "2022-09-22T10:07:49Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 28, 2022, 9:31pm UTC](https://community.auth0.com/t/deny-users-with-certain-roles-at-login/91118/6 "2022-09-28T21:31:08Z")

</div>

Awesome, thanks for sharing!

> [@d3v](#):
>
> Can I redirect the user to login page and show error messages by the query parameter using `api.access.deny()`

There’s no OOTB support for redirecting a user to Universal Login with the error message - As it stands your application will need to handle what to do next with the error params/user returned to the callback. What I have seen in this scenario is a user being presented with some sort of error page (using the error params) and an option to click to bring up universal login once more with ([loginWithRedirect({prompt: ‘login’})](https://auth0.github.io/auth0-spa-js/classes/auth0client.html#loginwithredirect)) for example.

---

_[View the full topic](https://community.auth0.com/t/deny-users-with-certain-roles-at-login/91118)._
