Hello Community!
We are looking at switching our Gallery Workflow Credentials settings to be Require User Credentials - something we have as a requirement is to kick off workflows with the APIs (currently use /user/v2/workflows/{appId}/jobs).
When a user uses an API for a job, is there a way to pass in the credentials as this Gallery setting will prompt a user for a credential to use.
Note: We are trying to do this setting instead of Allow User to Select because we have not found a way to publish workflows with the APIs where we can specify the option. I have posted that forum here.
Solved! Go to Solution.
Hey @elsastark ,
2. Sharing a Credential. Must go to "Credential" section and select an existing Credential. Then the screen below appears.
Otherwise, it will run as the default run-as account (if configured) or service user even if the workflow is set to require user credentials.
Hi @AndrewSu - Can you clarify if this works when the Gallery setting is Require User Credentials versus Use Default Credentials?
@elsastark , the Gallery setting Require User Credentials is only for workflows run from the Gallery. It is not applied via any API calls except for using the Credential ID that I outlined in my previous post due to security reasons.
If you want users to select their own Credentials to run the API calls, you could map the Credential IDs to the appropriate user and have some sort of interface that allows users to select their own Credentials before running the API call to run the job.
Hello,
I try to use the API to run a workflow.
The worklow must be run with another user.
When published it from the Desginer, we specifiy the user/password to use.
When manually run from the Gallery, it use the "run as" user specified when published.
Now from the v1 API
post /v1/workflows/{appId}/jobs
It run the workfow with a "local user", so not the one I want.
From the v2 API
post /user/v2/workflows/{appId}/jobs
It response:
{ "message": "The credentials could not be found." }
So I've tried what described, to go on Admin > Credentials and add the credential I want to use at the "run as".
But then, how in the API give a paramter to use this credential?
I've also add me to access to this credential.
But I can have several credentials shared to me, so I need to know how to say to the API to use a specific credential.
Regards,
Alex
@Bargeton , you can pass the Credential that you want to use within the API request itself. See the image below.
You can find the Credential ID by going thru the following steps.
1. Navigate to Server Admin panel
2. Navigate to "Credentials"
3. Select the credential in question.
4. Locate the ID of the credential from the URL. It is the last parameter of the URL. see image below.
If this helps resolve your issue, please mark this reply as the solution so that others in the Community can benefit from our collaboration.
Thanks.
It's working fine for me now.
Thanks a lot.
@elsastark , is this issue resolved based on the corresponding threads? if so, please mark the appropriate reply as the solution so that others in the Community can benefit from our collaboration.
Thanks!
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 |