7 Replies Latest reply on Jan 14, 2019 11:40 AM by BenderTheGreatest

    Can't figure out uname/pwd parameters for Workflow.execute

    BenderTheGreatest Novice

      In vRealize Orchestrator 7.4, I have a case where I need to execute a workflow as another vRealize Orchestrator user in an automated fasion. According to the API Explorer, Workflow.execute supports three parameters: properties (Object), uname (Object), and pwd (string). I have the following code:

       

      var wf = Server.getWorkflowWithId( 'work-flow-identifier-uuid' );
      var wfParams = new Properties({ param1: 'value1' });
      var user = 'myUser@domain.com'; // have also attempted with the administrator@vsphere.local account
      var pass = 'myPassword';
      var token = wf.execute( wfParams, user, pass );

       

      However, this throws the following error:

       

      Cannot execute workflow : SSO server error

       

      What am I doing wrong? My suspicion is that it does not want a string for the uname parameter, but am unsure what else I can provide as an argument here. Or if there's a better way I can achieve running a workflow as a different user programatically, I'm all ears.