Is it possible to include organisation prompt link in default login page?

Hi, Individual users and members of organisation both access my application. I want to include organisation prompt link in default auth0 login page. is it possible or any work around ?

I actually just reached out to Auth0 support a few days asking this. Unfortunately, itā€™s not possible. :frowning:

If you set the option to ā€œBothā€, you must programmatically pass the organization ID in the request to the /authorize endpoint. The only way to show the organization prompt to an end user is to select the ā€œTeam members of organizationsā€ option, but obviously that wonā€™t work for your use case (it prevents people from not being part of an org or things like self-service signup).

2 Likes

I have the same use case. Iā€™d be ok with separate login buttons for individuals and org-members. For the latter, would the expected workaround be to build a form to capture the organization name and then lookup the organizationId by name via /api/v2/organizations/name/{name} and if success redirect to /api/auth/login?organization={id} (Iā€™m using nextjs-auth0)?

Also, can someone confirm that I need to create a separate machine-to-machine auth0 app in order for my Next.js server-side to access the Management API, given that an organization-enabled app can not use client credentials to access the Management API?

1 Like

Has there been a resolution to this issue? I keep getting ā€˜parameter organization is required for this clientā€™ even though I pass organization param to login.

@ivo for I couldnā€™t get it to work through the login URL but I could pass the org_id through the handleLogin function. I am using the npm package so my [ā€¦auth].ts looks like this:

import { handleAuth, handleLogin } from '@auth0/nextjs-auth0';

export default handleAuth({
  async login(req: NextApiRequest, res: NextApiResponse) {
    await handleLogin(req, res, {
      authorizationParams: {
        organization: orgId,
      },
    });
  },
});
1 Like

Unfortunately, itā€™s not possible . If you set the option to ā€œBothā€, you must programmatically pass the organization ID in the request to the /authorize endpoint

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