Edit in GitHubLog an issue
B2B feature. Learn more
Thanks to Atwix for contributing this topic!

deleteCompanyUser mutation

Use the deleteCompanyUser mutation to deactivate the specified company user.

You can get the user ID with the company query.

This mutation requires a valid customer authentication token.

Syntax

Copied to your clipboard
mutation {
deleteCompanyUser(
id: ID!
) {
DeleteCompanyUserOutput
}
}

Reference

The deleteCompanyUser reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example deactivates the user specified in the id attribute.

Request:

Copied to your clipboard
mutation {
deleteCompanyUser(
id: "Mg=="
) {
success
}
}

Response:

Copied to your clipboard
{
"data": {
"deleteCompanyUser": {
"success": true
}
}
}

Errors

ErrorDescription
You do not have authorization to perform this action.
The user with the ID provided in the input.id argument is not available to your company, or you do not have the necessary permissions to perform this operation.
You cannot delete yourself.
You must specify a company user other than yourself.
A customer with the same email address already exists in an associated website
The email provided in the input.email argument belongs to another user.
The user XXX is the company admin and cannot be set to inactive. You must set another user as the company admin first.
The company owner cannot be deactivated. You must set another user as the company admin first.
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.