Anonymize a Veritas NSS User using vRO SOAP

A short vRO SOAP script that anonymizes a Veritas NetBackup Self Service user. It calls the RedactUser operation on a SOAP host with the userId, then processes the response headers and parameters to deactivate the account.

In this article

Here, we have a user 000000008 which is currently in active state in Veritas NetBackup™ Self Service tool.

Go to Workflow

Script

/*
 * Inputs
 * host SOAP:SOAPHost
 * userId string
 */
var operation = host.getOperation("RedactUser");
if (operation == null) throw "Operation 'RedactUser' not found!";

System.log("Creating request...");
var request = operation.createSOAPRequest();

request.setInParameter("userId",userId);

System.log("Invoking '" + operation.name + "' operation...");
var response = operation.invoke(request);
System.log("Operation '" + operation.name + "' successfully invoked.");

System.log("Processing response...");
var result = new Properties();

System.log("Out headers...");
outHeaders = System.getModule("com.vmware.library.soap").processOutHeaders(response);

System.log("Out parameters...");
outParameters = System.getModule("com.vmware.library.soap").processOutParameters(response);

System.log("User deactivated & anonymized successfully");

Discover more from Cloud Blogger

Subscribe to get the latest posts sent to your email.

Enjoyed this post?

Was this helpful?

Leave a Reply