Learn how to view and manage an individual Organization member’s profile and assigned roles in a two-tab layout.
The OrganizationMemberDetail component gives your customers a focused view of a single Auth0 Organization member. Organization administrators can review the member’s user profile, assign and remove roles, and remove the member from the Organization—all in a two-tab layout with full lifecycle controls.This component is the per-member drill-down for the OrganizationMemberManagement component. Wire that component’s viewMemberDetailsAction to the route that renders OrganizationMemberDetail; the userId it receives flows through to this component’s required userId prop.
Auth0 Configuration Required—Ensure your tenant is configured with the
My Organization API. View setup guide
→
Removing the member and mutating roles are sensitive operations that trigger a step-up authentication challenge. Configure your Auth0Provider with interactiveErrorHandler="popup" so the challenge resolves in a popup without losing page state.
Running either command also installs the @auth0/universal-components-core
dependency for shared utilities and Auth0 integration.
One install covers both React (SPA) and Next.js (RWA). Components are always imported from the root entry @auth0/universal-components-react; only Auth0ComponentProvider uses a framework-specific subpath—@auth0/universal-components-react/spa for React.
Action props handle user interactions and define what happens when users perform member operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
Prop
Type
Description
onBack
() => void
Called when the user clicks the back button in the header. Wire this to your router.
removeFromOrganizationAction
ComponentAction<string>
Lifecycle hooks for member removal. Input is the userId.
onBackType:() => voidFires when the user clicks the back button in the header. The component does not navigate on its own—wire this callback to your router so it returns to the member-list route, typically the page that renders OrganizationMemberManagement.Example:
// Navigate to a fixed route<OrganizationMemberDetail userId={userId} onBack={() => navigate("/members")} />// Or pop the history stack instead<OrganizationMemberDetail userId={userId} onBack={() => history.back()} />
removeFromOrganizationActionType:ComponentAction<string>Controls the remove-from-organization flow on the member’s profile tab. Both lifecycle hooks receive the userId string directly.
This action triggers a step-up authentication challenge. Configure your
Auth0Provider with interactiveErrorHandler="popup".
Properties:
disabled—Hide the remove button.
onBefore(userId)—Runs before the member is removed. Return false to cancel.
onAfter(userId)—Runs after the member is removed. Use this to navigate away or write to an audit log.
Example:
<OrganizationMemberDetail userId={userId} removeFromOrganizationAction={{ onBefore: async () => confirm("Remove this member from the organization?"), onAfter: (removedUserId) => { auditLog.record({ action: "member_removed", userId: removedUserId }); navigate("/members"); }, }}/>
assignRolesActionType:ComponentAction<{ userId: string; roleIds: string[] }>Fires after one or more roles are assigned to the member from the roles tab. Both lifecycle hooks receive an object with the userId and the array of roleIds being assigned.Properties:
disabled—Hide the assign-roles button.
onBefore({ userId, roleIds })—Validate the selection. Return false to cancel.
onAfter({ userId, roleIds })—Runs after the roles are assigned.
removeRolesActionType:ComponentAction<{ userId: string; roleIds: string[] }>Fires after one or more roles are removed from the member’s role table. Both lifecycle hooks receive an object with the userId and the array of roleIds being removed.Properties:
disabled—Hide the remove-role buttons in the role table.
onBefore({ userId, roleIds })—Runs before the roles are removed. Return false to cancel.
onAfter({ userId, roleIds })—Runs after the roles are removed.
Customization props let you override default text and apply CSS variables or class names to match your application’s design system.
Prop
Type
Description
customMessages
Partial<OrganizationMemberDetailMessages>
Override any default UI text or translations. Default: {}
styling
ComponentStyling
CSS variables and class overrides. Default: { variables: {}, classes: {} }
customMessagesCustomize all text and translations rendered by the component. Every field is optional and falls back to the built-in default. Use this prop to localize the component or to align microcopy with your product voice.
Available Messages
member.detail—Header and tabs
back_button
tabs.details, tabs.roles
member.detail.user_details—Profile card
title
name, email
created_at, last_login
member.detail.actions.remove_from_organization—Remove member
stylingCustomize appearance with CSS variables and class overrides. Variables are theme-aware (separate light, dark, and common scopes); class overrides target named slots inside the component tree so you can attach utility or design-system classes without forking the source.
Auth0 Configuration Required—Ensure your tenant is configured with the
My Organization API. View setup guide
→
Removing the member and mutating roles are sensitive operations that trigger a step-up authentication challenge. Configure your Auth0 SDK with interactiveErrorHandler="popup" so the challenge resolves in a popup without losing page state.
Running the pnpm or npm commands installs the @auth0/universal-components-core
dependency for shared utilities and Auth0 integration.
One install covers both React (SPA) and Next.js (RWA). Components are always imported from the root entry @auth0/universal-components-react; only Auth0ComponentProvider uses a framework-specific subpath—@auth0/universal-components-react/rwa for Next.js.
Action props handle user interactions and define what happens when users perform member operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
Prop
Type
Description
onBack
() => void
Called when the user clicks the back button in the header. Wire this to your router.
removeFromOrganizationAction
ComponentAction<string>
Lifecycle hooks for member removal. Input is the userId.
onBackType:() => voidFires when the user clicks the back button in the header. The component does not navigate on its own—wire this callback to your router so it returns to the member-list route, typically the page that renders OrganizationMemberManagement.Example:
// Navigate to a fixed route<OrganizationMemberDetail userId={userId} onBack={() => router.push("/members")}/>// Or pop the history stack instead<OrganizationMemberDetail userId={userId} onBack={() => router.back()} />
removeFromOrganizationActionType:ComponentAction<string>Controls the remove-from-organization flow on the member’s profile tab. Both lifecycle hooks receive the userId string directly.
This action triggers a step-up authentication challenge. Configure your Auth0
SDK with interactiveErrorHandler="popup".
Properties:
disabled—Hide the remove button.
onBefore(userId)—Runs before the member is removed. Return false to cancel.
onAfter(userId)—Runs after the member is removed. Use this to navigate away or write to an audit log.
Example:
<OrganizationMemberDetail userId={userId} removeFromOrganizationAction={{ onBefore: async () => confirm("Remove this member from the organization?"), onAfter: (removedUserId) => { auditLog.record({ action: "member_removed", userId: removedUserId }); router.push("/members"); }, }}/>
assignRolesActionType:ComponentAction<{ userId: string; roleIds: string[] }>Fires after one or more roles are assigned to the member from the roles tab. Both lifecycle hooks receive an object with the userId and the array of roleIds being assigned.Properties:
disabled—Hide the assign-roles button.
onBefore({ userId, roleIds })—Validate the selection. Return false to cancel.
onAfter({ userId, roleIds })—Runs after the roles are assigned.
removeRolesActionType:ComponentAction<{ userId: string; roleIds: string[] }>Fires after one or more roles are removed from the member’s role table. Both lifecycle hooks receive an object with the userId and the array of roleIds being removed.Properties:
disabled—Hide the remove-role buttons in the role table.
onBefore({ userId, roleIds })—Runs before the roles are removed. Return false to cancel.
onAfter({ userId, roleIds })—Runs after the roles are removed.
Customization props let you override default text and apply CSS variables or class names to match your application’s design system.
Prop
Type
Description
customMessages
Partial<OrganizationMemberDetailMessages>
Override any default UI text or translations. Default: {}
styling
ComponentStyling
CSS variables and class overrides. Default: { variables: {}, classes: {} }
customMessagesCustomize all text and translations rendered by the component. Every field is optional and falls back to the built-in default. Use this prop to localize the component or to align microcopy with your product voice.
Available Messages
member.detail—Header and tabs
back_button
tabs.details, tabs.roles
member.detail.user_details—Profile card
title
name, email
created_at, last_login
member.detail.actions.remove_from_organization—Remove member
stylingCustomize appearance with CSS variables and class overrides. Variables are theme-aware (separate light, dark, and common scopes); class overrides target named slots inside the component tree so you can attach utility or design-system classes without forking the source.
Auth0 Configuration Required—Ensure your tenant is configured with the
My Organization API. View setup guide
→
Removing the member and mutating roles are sensitive operations that trigger a step-up authentication challenge. Configure your Auth0Provider with interactiveErrorHandler="popup" so the challenge resolves in a popup without losing page state.
Action props handle user interactions and define what happens when users perform member operations. Use lifecycle hooks (onBefore, onAfter) to integrate with your application’s routing and analytics.
Prop
Type
Description
onBack
() => void
Called when the user clicks the back button in the header. Wire this to your router.
removeFromOrganizationAction
ComponentAction<string>
Lifecycle hooks for member removal. Input is the userId.
onBackType:() => voidFires when the user clicks the back button in the header. The component does not navigate on its own—wire this callback to your router so it returns to the member-list route, typically the page that renders OrganizationMemberManagement.Example:
// Navigate to a fixed route<OrganizationMemberDetail userId={userId} onBack={() => navigate("/members")} />// Or pop the history stack instead<OrganizationMemberDetail userId={userId} onBack={() => history.back()} />
removeFromOrganizationActionType:ComponentAction<string>Controls the remove-from-organization flow on the member’s profile tab. Both lifecycle hooks receive the userId string directly.
This action triggers a step-up authentication challenge. Configure your
Auth0Provider with interactiveErrorHandler="popup".
Properties:
disabled—Hide the remove button.
onBefore(userId)—Runs before the member is removed. Return false to cancel.
onAfter(userId)—Runs after the member is removed. Use this to navigate away or write to an audit log.
Example:
<OrganizationMemberDetail userId={userId} removeFromOrganizationAction={{ onBefore: async () => confirm("Remove this member from the organization?"), onAfter: (removedUserId) => { auditLog.record({ action: "member_removed", userId: removedUserId }); navigate("/members"); }, }}/>
assignRolesActionType:ComponentAction<{ userId: string; roleIds: string[] }>Fires after one or more roles are assigned to the member from the roles tab. Both lifecycle hooks receive an object with the userId and the array of roleIds being assigned.Properties:
disabled—Hide the assign-roles button.
onBefore({ userId, roleIds })—Validate the selection. Return false to cancel.
onAfter({ userId, roleIds })—Runs after the roles are assigned.
removeRolesActionType:ComponentAction<{ userId: string; roleIds: string[] }>Fires after one or more roles are removed from the member’s role table. Both lifecycle hooks receive an object with the userId and the array of roleIds being removed.Properties:
disabled—Hide the remove-role buttons in the role table.
onBefore({ userId, roleIds })—Runs before the roles are removed. Return false to cancel.
onAfter({ userId, roleIds })—Runs after the roles are removed.
Customization props let you override default text and apply CSS variables or class names to match your application’s design system.
Prop
Type
Description
customMessages
Partial<OrganizationMemberDetailMessages>
Override any default UI text or translations. Default: {}
styling
ComponentStyling
CSS variables and class overrides. Default: { variables: {}, classes: {} }
customMessagesCustomize all text and translations rendered by the component. Every field is optional and falls back to the built-in default. Use this prop to localize the component or to align microcopy with your product voice.
Available Messages
member.detail—Header and tabs
back_button
tabs.details, tabs.roles
member.detail.user_details—Profile card
title
name, email
created_at, last_login
member.detail.actions.remove_from_organization—Remove member
stylingCustomize appearance with CSS variables and class overrides. Variables are theme-aware (separate light, dark, and common scopes); class overrides target named slots inside the component tree so you can attach utility or design-system classes without forking the source.
The OrganizationMemberDetail component is composed of smaller subcomponents and hooks. Because the shadcn CLI installs the source into your project, you can import them individually to build custom workflows.