# Organization Identity-First: Display custom error message if no domain match?

**URL:** <https://forum.keycloak.org/t/organization-identity-first-display-custom-error-message-if-no-domain-match/31289>\
**Category:** Getting advice\
**Created:** [February 26, 2026, 4:12am UTC](https://forum.keycloak.org/t/organization-identity-first-display-custom-error-message-if-no-domain-match/31289 "2026-02-26T04:12:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dunge](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dunge/32/9923_2.png) [@Dunge](https://forum.keycloak.org/u/Dunge)\
**Post date:** [February 26, 2026, 4:12am UTC](https://forum.keycloak.org/t/organization-identity-first-display-custom-error-message-if-no-domain-match/31289/1 "2026-02-26T04:12:18Z")

</div>

I’m using the Identity-First flow with organizations matching on the domain name of the email to redirect to the proper idP and it works great.

But if someone enter an e-mail address of a domain that it not mapped, it redirect to the generic “invalid username or password” page.

I would like to catch this situation and display a custom message like ‘Your organization is not linked to our identity provider yet, please contact support at x to set this up”.

Is that something that would be possible to configure with a custom flow? Or is it hardcoded to redirect to the same generic “fail” page no matter the reason?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/keycloak/original/1X/eb342909d95cf32cbb7517610022c6a0046a9ffb.png) [@system](https://forum.keycloak.org/u/system)\
**Post date:** [August 25, 2026, 4:13am UTC](https://forum.keycloak.org/t/organization-identity-first-display-custom-error-message-if-no-domain-match/31289/2 "2026-08-25T04:13:04Z")

</div>

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