# Method: orgUnits.memberships.move

Move an `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#OrgMembership` to a new OrgUnit.

NOTE: This is an atomic copy-and-delete. The resource will have a new copy under the destination OrgUnit and be deleted from the source OrgUnit. The resource can only be searched under the destination OrgUnit afterwards.

### HTTP request

`POST https://cloudidentity.googleapis.com/v1beta1/{name=orgUnits/*/memberships/*}:move`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. Immutable. The [resource name](https://cloud.google.com/apis/design/resource_names) of the `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#OrgMembership`. Format: orgUnits/{$orgUnitId}/memberships/{$membership} The `$orgUnitId` is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits). To manage a Membership without specifying source `orgUnitId`, this API also supports the wildcard character '-' for `$orgUnitId` per <https://google.aip.dev/159>. The `$membership` shall be of the form `{$entityType};{$memberId}`, where `$entityType` is the enum value of `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#EntityType`, and `memberId` is the `id` from [Drive API (V3) `Drive` resource](https://developers.google.com/drive/api/v3/reference/drives#resource) for `https://docs.cloud.google.com/identity/docs/reference/rest/v1beta1/orgUnits.memberships#EntityType.ENUM_VALUES.SHARED_DRIVE`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "customer": string, "destinationOrgUnit": string } ``` |

| Fields ||
|---|---|
| `customer` | `string` Required. Immutable. Customer on whose membership change is made. All authorization will happen on the role assignments of this customer. Format: customers/{$customerId} where `$customerId` is the `id` from the [Admin SDK `Customer` resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). You may also use `customers/my_customer` to specify your own organization. |
| `destinationOrgUnit` | `string` Required. Immutable. OrgUnit where the membership will be moved to. Format: orgUnits/{$orgUnitId} where `$orgUnitId` is the `orgUnitId` from the [Admin SDK `OrgUnit` resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/orgunits). |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/identity/docs/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-identity.orgunits`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).