Org-level admin.users.setRegular API method calls now remove Workspace Owner roles
When team_id is an org ID, the admin.users.setAdmin and admin.users.setOwner API methods make the user a Workspace Owner on every workspace they belong to. Until now, the admin.users.setRegular API method with an org ID as team_id didn't reverse that, so a demoted org admin or owner kept their Workspace Owner roles.
We've updated the admin.users.setRegular API method to match demotion in the admin dashboard. Calling the method with an org ID as team_id sets the user to a regular user on every workspace in the org where they're a Workspace Owner.
What's changing
- Calls to the
admin.users.setRegularAPI method with an org ID as theteam_idnow remove every Workspace Owner role the user holds in the org, including roles they had before becoming an org admin or owner. - This new behavior applies to any user you call the
admin.users.setRegularAPI method on, including users who are already regular members of the org. - A new error,
failed_to_set_regular_on_workspaces, will be returned when the org-level change succeeded but one or more workspace-level changes failed. Call theadmin.users.setRegularAPI method again to retry.
Calls with a workspace ID work the same as before.
How to respond or prepare
If your app demotes org admins or owners and expects them to stay Workspace Owners on some workspaces, call the admin.users.setOwner API method with each workspace ID after the org-level demotion. If your app calls the admin.users.setRegular API method with an org ID to make sure a user is a regular member, note that the call now also removes their Workspace Owner roles.