Can I change the type of users of organization using API?

In general, we are using the Dashboard to change the type of users on the organization tab of the application.
But I want to implement this operation with API script so that makes it automated.
Is it possible?

Hey @Boss0 !

You should be able to achieve this using the organization_usage and organization_require_behavior parameters of the /api/v2/clients/{id} endpoint. The values for organization_usage for each Org user “type” should be as follows:

  • “Individuals” = deny

  • “Business Users” = require

  • “Both” = allow

For organization_require_behavior the values should be as follows:

  • “Individuals” = no_prompt

  • “Business Users”

    • “Prompt for Credentials” = post_login_prompt

    • “Prompt for Organization” = pre_login_prompt

    • “No Prompt” = no_prompt

  • “Both”

    • “Prompt for Credentials” = post_login_prompt

    • “No prompt” = no_prompt

1 Like

Hi @tyf thanks for reply.
If so, can I automate to manage organizations in one tenant with API?
I mean, I am using one tenant per org per env now.
But I want to have a single tenant that supports several organizations and the orgs can be programmatically managed.
So I want full automation through Auth0 within the click of one button.
Hope your inputs/suggestions soon. Thanks

1 Like

No problem, happy to help!

If you have multiple tenants, you will need to use the corresponding Management API for each.

okay. but I’ll merge those multiple tenants into one. and want to manage the several orgs on one tenant.

I don’t see why not then if you have multiple orgs under 1 tenant - In terms of managing your tenant and organizations programmatically, you might want to take a look at our Management API SDK libraries here or the Auth0 Terraform provider.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.