Stay organized with collections
Save and categorize content based on your preferences.
If you have the appropriate
IAM permissions and the required
organization policies are enforced, you can
use the Resource Manager API to migrate a project resource between organization resources.
gcloud
To migrate a project to another organization resource, run the following command:
PROJECT_ID is the ID or number of the project you wish to
migrate.
ORGANIZATION_ID is the ID of the organization resource to which you want
to move the project. You can only specify one target, either an
organization resource or a folder.
FOLDER_ID is the ID of the folder to which you want
to move the project. You can only specify one target, either a folder
or an organization resource.
API
Using the v1 Resource Manager API, you can migrate a project between organization resources by setting its
parent field to the ID of the destination resource.
To migrate a project, do the following:
Get the project object using projects.get() method.
Set its parent field to the organization resource ID of the organization
resource, or the folder ID of the folder to which you are moving it.
Update the project object using projects.update() method.
The following code snippet demonstrates the steps above:
If you have mistakenly migrated a project, you can roll back the operation by
performing the migration again, with the old source as the new destination, and the
old destination as the new source. You must have the necessary
IAM permissions and organization policies enforced to allow this
as if this were an entirely new migration.
To roll back a migration where a project was migrated from No organization to an Organization resource, contact Google Cloud Customer Care.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Perform the migration\n\nIf you have the appropriate\n[IAM permissions](/resource-manager/docs/assign-iam-roles) and the required\n[organization policies](/resource-manager/docs/configure-org-policy) are enforced, you can\nuse the Resource Manager API to migrate a project resource between organization resources.\n**Note:** The following instructions are only for migrating a project from one organization resource to another organization resource. If the project you want to migrate is not associated with an organization resource, see [Migrating projects with no organization resource](/resource-manager/docs/handle-special-cases#migrating_projects_no_org). \n\n### gcloud\n\nTo migrate a project to another organization resource, run the following command: \n\n```\ngcloud beta projects move PROJECT_ID \\\n --organization ORGANIZATION_ID\n```\n\nYou can also specify a folder as the target resource, with the following\ncommand: \n\n```\ngcloud beta projects move PROJECT_ID \\\n --folder FOLDER_ID\n```\n\nReplace the following fields:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the ID or number of the project you wish to migrate.\n- \u003cvar translate=\"no\"\u003eORGANIZATION_ID\u003c/var\u003e is the ID of the organization resource to which you want to move the project. You can only specify one target, either an organization resource or a folder.\n- \u003cvar translate=\"no\"\u003eFOLDER_ID\u003c/var\u003e is the ID of the folder to which you want to move the project. You can only specify one target, either a folder or an organization resource.\n\n| **Note:** You can execute this command regardless of your Google Cloud CLI scope.\n\n### API\n\nUsing the v1 Resource Manager API, you can migrate a project between organization resources by setting its\n`parent` field to the ID of the destination resource.\n\nTo migrate a project, do the following:\n\n- Get the `project` object using `projects.get()` method.\n- Set its `parent` field to the organization resource ID of the organization resource, or the folder ID of the folder to which you are moving it.\n- Update the `project` object using `projects.update()` method.\n\nThe following code snippet demonstrates the steps above: \n\n project = crm.projects().get(projectId=flags.projectId).execute()\n project['parent'] = {\n 'type': 'organization',\n 'id': flags.organizationId\n }\n\n project = crm.projects().update(\n projectId=flags.projectId, body=project).execute()\n\n### Roll back a migration\n\nIf you have mistakenly migrated a project, you can roll back the operation by\nperforming the migration again, with the old source as the new destination, and the\nold destination as the new source. You must have the necessary\nIAM permissions and organization policies enforced to allow this\nas if this were an entirely new migration.\n\nTo roll back a migration where a project was migrated from **No organization** to an **Organization** resource, contact [Google Cloud Customer Care](/support)."]]