How to create Azure AD enterprise connection in hosted login page with auth0.js

I have successfully create link between Auth0 app and Azure AD. Everything works with the default Lock screen. Now I’m trying to create a hosted login page with auth0.js. What has to be the value of the connection property ({connection: ‘waad’} ) in order to trigger Microsoft’s popup login?

export default function Login() {
    const auth0 = new WebAuth({
        domain: "...",
        clientID: "...",
        audience: "...",
        responseType: "token"
    });

    const handleLogin = () => {
        auth0.popup.authorize({
           connection: 'waad'
          });
      };
...

Hey @dev25, If you are looking to add a particular Azure AD connection, you can put the connection property as the name of that connection. E.g: I have an Azure AD connection on my tenant by name “AzureADv2”, if i put connection: ‘AzureADv2’ in my authorize call it should work. Do let me know if this helps!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.