Error: Organizations Is Not Supported with Primary User Modifications in Rules

Overview

This article clarifies an error encountered when an Account Linking Rule exists in the Auth0 Tenant, and organizations are set to Prompt for Credentials or Prompt for Organizations during the login process.

The following error message is received:

organizations is not supported together with primary user modifications in rules

Applies To

  • Organizations
  • Login Flow
  • Account Linking
  • Post-Login Actions

Cause

Using organizations is not supported when primary user modifications are present in rules. This is expected behavior when an Account Linking Rule is used concurrently with an organization login flow set to prompt for credentials or organizations.

Solution

The following options resolve the issue or provide a workaround:

Option 1: Configure Organization Login Flow to "No Prompt" (Recommended)

Because the use of organizations is not supported with primary user modifications in rules, the Organization login flow for the application must be set to no-prompt when using an account linking rule and organizations.



Screenshot 2024-01-23 at 1.10.49 PM.png

Option 2: Workaround Using Redirect After Linking

Redirect the user from the Post-Login Action immediately after the link is successful. This action bypasses the error while still setting the necessary session cookies.

  1. Use the api.redirect.sendUserTo(redirectUrlAsString); method to redirect the users.

  2. When the user accesses the application's /authorize endpoint again, the user is authenticated, and the login flow completes successfully without requiring re-entry of credentials.

 

Recommended content

No recommended content found...