Issue with redirect URL when using SAML2 login in UiPath

Using UiPath’s SAML2 login, after successfully navigating to the IDSpace login page and logging in, it redirects back to the UiPath SAML2 login homepage. What is the reason for this? If I log in with admin first and then log out, I can use SAML2 to log in smoothly.

hi @aman.wang

this pattern, works after admin login/logout but not on direct SAML, usually means stale session cookies or a load balancer without sticky sessions on your Identity Server

if theres a load balancer in front, check sticky sessions are enabled, SAML needs the callback to hit the same node that started the request or it just bounces back to login

also try clearing cookies for both the UiPath and IDSpace domains before testing SAML directly, that would confirm if its a stale cookie instead

if still failing, check the Identity Server logs around a failed attempt, should show the rejected assertion and the real reason.

hope this helps