Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Updating credentials when workflow is deployed to Gallery

tristank
11 - Bolide

Hello!

 

We are using an API that users will input their own credentials in when designing the workflow locally but when deployed to Gallery it should use the service account credentials. My question therefore is:

 

Is there a way for the workflow to recognize it is running on the server at run time, and utilize the service account credentials during the executing of the workflow, thus overwriting the user credentials that were used locally.

 

For the sake of SDLC preferably we wouldn't have the person change the credentials before deploying the workflow to Gallery, but that may be the only option. Thanks for any insight folks!

3 REPLIES 3
fmvizcaino
17 - Castor
17 - Castor

Hi @tristank ,

 

You could probably develop a macro that toggles between the user and service account`s credentials.

https://knowledge.alteryx.com/index/s/article/Using-CloudUserId-to-capture-the-run-time-user-variabl...

 

Let me know if this works, as this could help others.

 

Best,

Fernando Vizcaino

tristank
11 - Bolide

Hi @fmvizcaino ,

 

Thank you very much for getting back to me! We ended up using one of the workflow constants (gui interaction I believe) to determine whether it was a local or a server run. From there we could use the service account credentials within the macro for server runs, but allow user input for the auth keys when running locally. Thanks again!

fmvizcaino
17 - Castor
17 - Castor

Oh, way more clever and much more simple than my approach. Thank you for sharing!

Please mark your answer as a solution as it will definitely help others 😁