Decommission an Org Unit
A 3-step recipe with Google Workspace. We can help you get access.
Recipe · 3 steps
Decommission an Org Unit
with Google Workspace · Identity & Access Management
Empty an org unit by moving its user out, then delete the unit.
- Read the source organizational unit to confirm it exists before emptying and deleting it.
- Patch the user's orgUnitPath to the destination unit so the source organizational unit becomes empty.
- Delete the now-empty source organizational unit.
What you'll need to have ready
- accessToken: OAuth 2.0 bearer access token with the orgunit and user scopes.
- orgUnitPath: The full path (minus leading slash) of the org unit to decommission.
- userKey: Primary email, alias, or unique id of the user to move out.
- destinationOrgUnitPath: The org unit path to move the user into before deleting the source.
- customerId: Customer account id or the my_customer alias.
For your developer
Arazzo workflow google-workspace:decommission-org-unit, 3 operations: getOrgUnit → patchUser → deleteOrgUnit. Specs on APIs.io.