# Adding organizations to your enterprise

When adding an organization to your enterprise, you have two options: you can either create a new one or add an existing one. Furthermore, you can include organizations from various DevOps platforms.

{% hint style="info" %}
Currently, Sonar restricts each enterprise to a maximum of 200 organizations.
{% endhint %}

{% stepper %}
{% step %}
**Prepare the organizations to be added**

To create a new organization to be added to your enterprise, import the DevOps platform organization and select the Free plan. For instructions to import your DevOps organization, see:

* [Importing GitHub organization](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-github-organization.md)
* [Importing GitLab group](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-gitlab-group.md)
* [Importing Bitbucket workspace](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-bitbucket-workspace.md)
* [Importing Azure DevOps organization](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-azure-devops-organization.md)

{% hint style="warning" %}
If you add a Team plan organization to your enterprise, the organization’s Team plan subscription will be automatically cancelled and the organization will be moved to the Enterprise plan without a refund. Therefore, we recommend adding your organizations before their next billing date to avoid double charges.
{% endhint %}
{% endstep %}

{% step %}
**Add the organizations to your enterprise**

1. Log in to SonarQube Cloud with your enterprise admin account.
2. Retrieve your enterprise. See [Retrieving and viewing your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/retrieving-and-viewing-your-enterprise.md) for more information.
3. Go to **Organizations**.
4. Select **Add organization**. The **Add an organization** dialog opens.
5. Select the organization to be added and select the **Add** button.\
   If you cannot see your organization, it probably means that your enterprise admin account is not admin of the organization. It may be the case if you imported your organization by using another user account (typically, from another DevOps platform’s account). In that case, see [#add-org-from-multiple-platforms](#add-org-from-multiple-platforms "mention") below.
   {% endstep %}
   {% endstepper %}

## Creating a new organization <a href="#add-org-from-multiple-platforms" id="add-org-from-multiple-platforms"></a>

1. Log in to SonarQube Cloud with your enterprise admin account.
2. Retrieve your enterprise. See [Retrieving and viewing your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/retrieving-and-viewing-your-enterprise.md) for more information.
3. Go to **Organizations**.

<figure><img src="/spaces/KXW79zfYFiA8incTvwZK/files/Befi9JuSOYzpjG60V8BR" alt="Select Create new organization."><figcaption></figcaption></figure>

4. Select **Create organization**. The **Create an organization** page opens.
5. Select your DevOps platform service and follow the instructions. For more information, see:
   * [Importing GitHub organization](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-github-organization.md)
   * [Importing GitLab group](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-gitlab-group.md)
   * [Importing Bitbucket workspace](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-bitbucket-workspace.md)
   * [Importing Azure DevOps organization](/sonarqube-cloud/administering-sonarcloud/managing-organization/creating-organization/importing-azure-devops-organization.md)

## Adding an existing organization <a href="#add-existing-org" id="add-existing-org"></a>

You can add an existing organization to your enterprise provided you are an admin of both the enterprise and the organization.

{% hint style="warning" %}
If you add a Team plan organization to your enterprise, the organization’s Team plan subscription will be automatically cancelled and the organization will be moved to the Enterprise plan without a refund. Therefore, we recommend adding your organizations before their next billing date to avoid double charges.
{% endhint %}

Proceed as follows:

1. Log in to SonarQube Cloud with your enterprise admin account.
2. Retrieve your enterprise. See [Retrieving and viewing your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/retrieving-and-viewing-your-enterprise.md) for more information.
3. Go to **Organizations**.
4. Select **Add organization**. The **Add an organization** dialog opens.

<figure><img src="/spaces/KXW79zfYFiA8incTvwZK/files/OzxHjQR4H9vLukyfjObR" alt="Select your organization in the drop-down list and select Add."><figcaption></figcaption></figure>

5. Select the organization to be added and select the **Add** button.\
   If you cannot see your organization, it probably means that your enterprise admin account is not admin of the organization. It may be the case if you imported your organization by using another user account (typically, from another DevOps platform’s account). In that case, see below.

### If you ceated your organization using another account <a href="#if-you-used-another-account" id="if-you-used-another-account"></a>

If you used different admin accounts to import your organizations, your enterprise admin account may not be an admin of the existing organization you want to add to your enterprise. For example, your enterprise admin account is a GitHub account; you want to add a Bitbucket workspace you imported to SonarQube Cloud with your Bitbucket account. In that case, additional steps are necessary as described below:

1. Log in to SonarQube Cloud with your Bitbucket account (the account you used to import your workspace).
2. Add your GitHub account (enterprise admin account) as a member of the organization to be added. See [Adding organization members](/sonarqube-cloud/administering-sonarcloud/managing-organization/users-and-permissions/organization-members.md) for more information.
3. Give this account the Administer Organization permission. See [Managing organization permissions](/sonarqube-cloud/administering-sonarcloud/managing-organization/users-and-permissions/organization-permissions.md) for more information.
4. Log in to SonarQube Cloud with your GitHub account and add the new organization to the enterprise as described above in *Adding an organization to an enterprise*.

{% hint style="warning" %}
In the example above, if the Bitbucket account and the enterprise admin account use the same email address, the procedure will not work. To solve the problem, let another user perform steps 1 and 2 with their Bitbucket account.
{% endhint %}

## Removing an organization from your enterprise <a href="#removing-org-from-enterprise" id="removing-org-from-enterprise"></a>

You can remove an organization from an existing enterprise provided:

* You are an admin of both the enterprise and the organization through a SonarQube Cloud account that is not an SSO account.
* The organization to be removed is not the only member of your enterprise (you currently cannot downgrade an entire enterprise).

When you remove an organization, you have to choose the organization’s new subscription plan (Free or Team). Be aware that you’ll loose features. For more information, see [Changing your subscription plan](/sonarqube-cloud/administering-sonarcloud/managing-subscription/changing-plan.md#reviewing-the-plan-changes).

Proceed as follows:

1. Retrieve your enterprise. See [Retrieving and viewing your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/retrieving-and-viewing-your-enterprise.md) for more information.
2. Go to **Organizations**.
3. Select the **Remove and downgrade** button at the far right of the organization to be removed. The **Select an alternate plan to downgrade** dialog opens.
4. Select the plan
5. Select the **Confirm removal and downgrade** button and follow the instructions to complete your subscription. Note that you will not be able to analyze your organization’s private projects as long as you haven’t completed your new subscription.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Retrieving and viewing your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/retrieving-and-viewing-your-enterprise.md)
* [Creating your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/creating-your-enterprise.md)
* [Enterprise security](/sonarqube-cloud/administering-sonarcloud/enterprise-security.md)
* [Managing the enterprise-related permissions](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/managing-the-enterprise-related-permissions.md)
* [Managing the lines of code within your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/managing-the-lines-of-code-within-your-enterprise.md)
* [Changing enterprise settings](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/changing-enterprise-settings.md)
* [Downgrading your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/downgrading-your-enterprise.md)
* [Recovering enterprise admin access](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/recovering-enterprise-admin-access.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-enterprise/adding-organizations-to-your-enterprise.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
