User cant login issue to AWS cognito through OpenId using azure AD SSO

Irfan Babar 1 Reputation point
2021-12-11T17:30:48.527+00:00

Hi,

I using aws serverless architecture with cognito. I need to implement azure active directory SSO. I have managed to setup all configuration to connect my azure AD account with aws cognito using OpenId. I try following steps to login into my application with Azure AD SSO.

  • Try to login guest user with Azure AD, it show me login page with only email address field.
  • I enter my email address and click next button.
  • Instead of showing me password field, I get an error "This login.live.com page can’t be found".

Interesting Point

  • If I first login with azure AD portal with my guest user, and then try to login into my app then using SSO azure AD, I will get access token and successfully login into my application.

So it means, my configuration is correct, but there is some kind of permission issue or something else.
156807-not-found-issue.pngcan anyone help me on this, how to resolve this problem, user should login with AD without first login with azure account.

Note:

  • I have created my azure AD app from app registration, not enterprise registration
  • I also tried saml2 with enterprise application still got same issue.
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Siva-kumar-selvaraj 15,721 Reputation points
    2021-12-13T08:22:33.053+00:00

    Hello @Irfan Babar ,

    Thanks for reaching out.

    This is most likely due to the URL's size/length when returning to the live login page (Example: https://login.live.com/oauth20_authorize.srf?client_id=****&scope=openid+profile+email+offline_access&redirect_uri=****&state=***** ), therefore could you please verify what HTTP error was received (404?) Additionally, verify that URLs do not exceed 2000 characters in length, as this is a known limitation of the login server.

    If that is the case, determine which parameter has lengthy characters and see if there is a way to minimize them.

    For example, in my test case, the "state=" parameter had lengthy characters, causing the whole URL to surpass the login server's 2K threshold.

    157057-image.png

    Additionally, I would recommend that you log in using a work or school account rather than a Guest account (live.com) to check if the issue persists.

    Looking forward to hearing from you. I hope this helps us narrow down the source of the problem.

    ------
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


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.