When working with organizations programmatically, you may need to retrieve a list of organizations to which a user is assigned membership.

Management API

Up to 1000 organization members can be displayed using the Auth0 Dashboard or Management API, though more may exist.
Make a GET call to the Get User Organizations endpoint. Be sure to replace the USER_ID and MGMT_API_ACCESS_TOKEN placeholder values with the user ID and your , respectively.
curl --request GET \
  --url 'https://{yourDomain}/api/v2/users/USER_ID/organizations' \
  --header 'authorization: Bearer MGMT_API_ACCESS_TOKEN'
Find Your Auth0 DomainIf your Auth0 domain is your tenant name, your regional subdomain (unless your tenant is in the US region and was created before June 2020), plus .auth0.com. For example, if your tenant name were travel0, your Auth0 domain name would be travel0.us.auth0.com. (If your tenant were in the US and created before June 2020, then your domain name would be https://travel0.auth0.com.)If you are using custom domains, this should be your custom domain name.
| Value | Description | | USER_ID | ID of the user for which you want to retrieve organization membership. | | MGMT_API_ACCESS_TOKEN | Access Token for the Management API with the scope read:organizations. |

Response status codes

Possible response status codes are as follows:
Status codeError codeMessageCause
200Organizations successfully retrieved.
400invalid_uriinvalid_request_uriThe path is not valid.
400invalid_query_stringInvalid request query string. The message will vary depending on the cause.The query string is not valid.
401Invalid token.
401Invalid signature received for JSON Web Token validation.
403insufficient_scopeInsufficient scope; expected any of: read:organizations.Tried to read/write a field that is not allowed with provided bearer token scopes.
404User not found
429Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.