# We're sorry... Unexpected error when authenticating with identity provider

**URL:** <https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031>\
**Category:** Miscellanaeous\
**Created:** [July 16, 2024, 9:03am UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031 "2024-07-16T09:03:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abbas.aoun](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@abbas.aoun](https://forum.keycloak.org/u/abbas.aoun)\
**Post date:** [July 16, 2024, 9:03am UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/1 "2024-07-16T09:03:43Z")

</div>

Hello,

I am attempting to migrate Keycloak from version 15 to version 25. While I can access the Keycloak GUI with my admin account without any issues, I encounter a problem when trying to log in to the application using users email. The error message displayed is “We’re sorry… Unexpected error when authenticating with identity provider.” I have tried various solutions found on Google, but none have been helpful. Any suggestions to resolve this issue would be greatly appreciated.

Thanks in advance!!!

---

<div class="post-metadata">

**Author:** ![mbonn](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/mbonn/32/5755_2.png) [@mbonn](https://forum.keycloak.org/u/mbonn)\
**Post date:** [July 16, 2024, 1:27pm UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/2 "2024-07-16T13:27:42Z")

</div>

What type of identity provider do you use? SAML or OpenID Connect? Do you have any error logs/events, stack traces, …?

---

<div class="post-metadata">

**Author:** ![abbas.aoun](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@abbas.aoun](https://forum.keycloak.org/u/abbas.aoun)\
**Post date:** [July 16, 2024, 1:42pm UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/3 "2024-07-16T13:42:40Z")

</div>

Hello,

OpenID Connect. That the issue no logs!!!

---

<div class="post-metadata">

**Author:** ![mbonn](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/mbonn/32/5755_2.png) [@mbonn](https://forum.keycloak.org/u/mbonn)\
**Post date:** [July 16, 2024, 2:29pm UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/4 "2024-07-16T14:29:44Z")

</div>

When migrating from KC22 to KC23 I had such an issue with brokered SAML logins because of a change in the quarkus framework’s default behaviour. Creating a `conf/quarkus.properties` file and putting

`quarkus.http.limits.max-form-attribute-size=2M`

in it helped. But it was SAML where form post requests with many data is usual. As you are using OIDC I’m not sure it helps…

---

<div class="post-metadata">

**Author:** ![abbas.aoun](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@abbas.aoun](https://forum.keycloak.org/u/abbas.aoun)\
**Post date:** [July 16, 2024, 3:42pm UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/5 "2024-07-16T15:42:23Z")

</div>

Thanks a lot! It’s not beneficial in my case.

---

<div class="post-metadata">

**Author:** ![mbonn](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/mbonn/32/5755_2.png) [@mbonn](https://forum.keycloak.org/u/mbonn)\
**Post date:** [July 17, 2024, 6:02am UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/6 "2024-07-17T06:02:26Z")

</div>

You could open an issue here:

> **[Issues · keycloak/keycloak](https://github.com/keycloak/keycloak/issues)**
>
> Open Source Identity and Access Management For Modern Applications and Services - Issues · keycloak/keycloak

with precise description what’s you setup and the situation when the error occurrs.

---

<div class="post-metadata">

**Author:** ![abbas.aoun](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@abbas.aoun](https://forum.keycloak.org/u/abbas.aoun)\
**Post date:** [July 17, 2024, 7:03am UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/7 "2024-07-17T07:03:46Z")

</div>

Thank you for your support!!!

---

<div class="post-metadata">

**Author:** ![djordje](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/djordje/32/10815_2.png) [@djordje](https://forum.keycloak.org/u/djordje)\
**Post date:** [July 19, 2024, 11:58am UTC](https://forum.keycloak.org/t/were-sorry-unexpected-error-when-authenticating-with-identity-provider/27031/8 "2024-07-19T11:58:00Z")

</div>

My suggestion is to have linear approach, to update from 15 to 16 then form 16 to 17 and so on …  
Then you can follow Keycloak guideline:  
[https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-16-0-0](https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-16-0-0)
