Error: Organizations Is Not Supported with Primary User Modifications in Rules
Last Updated:
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.
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.
-
Use the
api.redirect.sendUserTo(redirectUrlAsString);method to redirect the users. -
When the user accesses the application's
/authorizeendpoint again, the user is authenticated, and the login flow completes successfully without requiring re-entry of credentials.