Organization specific login with SSO auto-membership

Hi @nhsieh

Welcome to the Auth0 Community!

I am sorry about the delayed reply to your inquiry!

When prompting the user for the organization first, as you have mentioned, they are directed to a screen where they will need to log in or continue with a specific connection (enterprise/social). If you enable Identifier First under the Authentication Profile and you set up Home Realm Discovery, once the user enters their email for HRD or they select a social button, then the session will be retrieved fromt he IdP.

Otherwise, when using Prompt for Organization, you cannot pass in in the connection parameter inside the /authorize URL so that you can automatically initiate the SSO. However, if you Prompt for Credentials and pass in the connection={{connection_name}} inside the /authorize call. A couple of examples would be:

https://{{auth0_domain}}/authorize?response_type=code&client_id={{client_id}}&connection={{connection_name}}&organization={{org_id}}&redirect_uri={{redirect_uri}}

If you have any other questions, feel free to let me know!

Kind Regards,
Nik