For some task it is necessary to know which Vault user created a job. For example when their name is required in the job or their email address.


You have to get the user's id from the job in the job queue. With that id you can retrieve the matching user object.

function GetJobCreator {
Returns a Vault user object
This function checks if the current user has permissions to retrieve the user information. If it doesn't the function logs a warning and does nothing. If it does the function returns an Autodesk.Connectivity.WebServices.User object. 
This function was made for Vault 2018
$JobCreator = GetJobcreator -JobId $powerjobs.Job.Id
    if(-not $vault.JobService.CheckRolePermissions(@("GetJobsByDate"))) {
        Add-Log "User needs 'JobQueueRead' permission to execute GetJobsByDate"
    if(-not $vault.AdminService.CheckRolePermissions(@("GetUserByUserId"))) {
        Add-Log "User needs 'AdminUserRead' permission to execute GetUserInfoByUserId"
    [array]$allJobs = $vault.JobService.GetJobsByDate([int]::MaxValue,[DateTime]::MinValue)
    $currentJob = $allJobs | ? { $_.Id -eq $JobId }
    $user = $vault.AdminService.GetUserByUserId($currentJob.CreateUserId)
    return $user


In order to use this with an older Vault version the calls to CheckRolePermissions have to be removed