Azure AD Sigin page through custom policy gives Bad Request after idle time of 2 or 3 hours

Arsalan Younus 0 Reputation points
2025-04-04T12:16:30.07+00:00

We have implemented a signin custom policy for azure ad b2c, the issue is when the user leaves the signin page opened up for a couple of hours (idle timespan is unknown) he often faces a "Bad Request" error when he clicks on sign in button.

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Harshitha Eligeti 4,385 Reputation points Microsoft External Staff Moderator
    2025-04-08T18:05:09.68+00:00

    Hello @Arsalan Younus
    I understand that you've implemented a custom sign-in policy for Azure AD B2C, and the issue you're encountering occurs when a user leaves the sign-in page open for a couple of hours. When they try to sign-in, they are receiving a "Bad Request" error.

    If the B2C session expires, you will encounter errors like this. This is a common scenario where the session has expired due to inactivity. To manage this, you need to review the session lifetime settings used in your B2C custom policy.
    For Additional information refer this document: https://learn.microsoft.com/en-us/azure/active-directory-b2c/session-behavior?pivots=b2c-user-flow
    If you have any queries do let us know. We are happy to assist you further.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.