Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Kinde · Function

getUserOrganizations

Retrieves an array of every organization the authenticated user can access. In the React SDK, call it from useKindeAuth() and await the result.

How it works

Call this method from the Kinde React SDK to asynchronously retrieve every organization available to the authenticated user. The result is an array that can be used to display an organization list or build an organization switcher.

Syntax

getUserOrganizations(): Promise<Organization[]>

Returns

An array of all organizations the user has access to.

Key points

  • The method returns the complete set of organizations available to the user.
  • In React, access the function by destructuring it from useKindeAuth().
  • Await the call before using its result because the documented usage treats it as asynchronous.
  • A button handler can trigger the lookup in response to user interaction.

Example: List a user's organizations

const { getUserOrganizations } = useKindeAuth();

async function showOrganizations() {
  const organizations = await getUserOrganizations();
  console.log(organizations);
}

showOrganizations();

Calls the React SDK method and logs the organizations available to the authenticated user.

When to use it

Populate an organization switcher

Organization selection

Show destinations available to the user

Access-aware navigation

Display the user's organization memberships

Account context

Interview questions

QWhat does getUserOrganizations return?

It retrieves an array containing all organizations the user has access to. In the React SDK, obtain the method from useKindeAuth and await its result.

Follow-up: How could the result support organization switching? Use the returned organization choices to let the user select a target, then initiate authentication or application-specific switching with that organization's code.

QHow do you call getUserOrganizations?

The React documentation shows it being called without arguments: getUserOrganizations(). The call is asynchronous, so its result should be awaited before it is consumed.

Follow-up: What should the UI do while the promise is pending? Render a loading state, then handle the resolved organization list before enabling selection.

QWhat is a practical UI use for this method?

The method is useful when an application needs to present the organizations available to a user. The documentation's example logs the resolved value, while the returned list can also drive an organization selector.

Follow-up: What additional organization context may be needed after selection? Retrieve or use the selected organization's code when the surrounding SDK flow requires a specific organization.

  • getOrganization
  • useKindeAuth
  • getUser

Source: React SDK - Kinde docs. Checked 2026-10-15.