[{"label":"Latest (v1.0)","version":"latest"}]
csp

Remove Users From Organization By Organization ID

Description

Remove users from organization by user ids.
User ids will be of the format : e.g. vmware.com:820e7ca5-4024-407e-8db4-f552d5d03403.
Pay attention: in case of partial success the caller must read the response to see which users have not been added successfully

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
Organization Admin ✔️
Organization Owner ✔️

Request

Request

URL

URL


delete
https://{api_host}/csp/gateway/am/api/v2/orgs/{orgId}/users
Copy

Path Parameters

Path Parameters

string
orgId Required

Unique identifier (GUID) of the organization.

Parameter Serialization Style: simple Explode:false

Request Body

Request Body

RemoveUsersFromOrganizationRequestV2 of mimetype application/json Required
{
	"ids": [
		"string"
	]
}
array of string
ids Required

Identifiers of the users that will be removed from the organization.


boolean
notifyUsers Optional

Send e-mail notification to the user(s).

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns PartialSuccessResponseString of type application/json
{
	"failed": [
		"string"
	],
	"succeeded": [
		"string"
	]
}
array of string
failed Optional

The entities for which the operation failed.


array of string
succeeded Optional

The entities for which the operation is successful.

Errors

Errors

400

Cannot remove more than 20 users at the same time | Cannot remove the last org owner


401

The user is not authorized to use the API


403

The user is forbidden to use the API


404

Organization with this identifier is not found. | Users […] not found


429

The user has sent too many requests


500

An unexpected error has occurred while processing the request

Code Samples

Code Samples

PowerCLI Client SDK Example

$RemoveUsersFromOrganizationRequestV2 = Initialize-RemoveUsersFromOrganizationRequestV2 -NotifyUsers $false -Ids "MyIds"
Invoke-RemoveUsersFromOrgV2UsingDELETE -OrgId "MyOrgId" -RemoveUsersFromOrganizationRequestV2 $RemoveUsersFromOrganizationRequestV2

cURL Command

curl -X DELETE -H "Content-Type: application/json" -d '{"ids":["string"],"notifyUsers":false}' https://{api_host}/csp/gateway/am/api/v2/orgs/{orgId}/users
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-required-roles: org_owner,org_admin
x-slo-tier: TIER2


Feedback

Was this page helpful?