Hi,
How can I get the mail of a user who requests from the VRA catalog?
I want to send him a successful mail when a workflow in finished.
I don't want to use the built-in mail of the vra because it doesn't have enough information and cannot be customized easily.
I saw the __asd_requestedFor attribute, but it is the login name of the user.
The login name and the mail address is not the same in our organization.
When using the build-in mail notification in the VRA, it knows to send it to the correct mail user...
Thanks!
I finally use this way:
requesterLogin = Server.getCurrentLdapUser().loginName;
System.log(requesterLogin);
var userName = requesterLogin.substring(0,requesterLogin.indexOf("@"));
var userObjects = new Array();
var userObjects = ActiveDirectory.searchRecursively("User", userName);
for each (var userObject in userObjects){
break;
}
email = userObject.getAttribute("mail");
System.log(email);
Try Request Info -> Requested By -> Email or Request Info -> Requested By -> Principal ID.
hi,
Can you clarify your answer?
How do I get the mail with the VRo?
Thanks!
I'm making some assumptions here, but if your directory is configured appropriately, you could add an "email address" input to your workflow, and then link it to the requestor's email address in the XaaS blueprint, like this:
Or, you could look it up some other way with Orchestrator from the requestedFor property. The details would depend on your directory.
I finally use this way:
requesterLogin = Server.getCurrentLdapUser().loginName;
System.log(requesterLogin);
var userName = requesterLogin.substring(0,requesterLogin.indexOf("@"));
var userObjects = new Array();
var userObjects = ActiveDirectory.searchRecursively("User", userName);
for each (var userObject in userObjects){
break;
}
email = userObject.getAttribute("mail");
System.log(email);