Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!
The Product Idea boards have gotten an update to better integrate them within our Product team's idea cycle! However this update does have a few unique behaviors, if you have any questions about them check out our FAQ.

Alteryx Server Ideas

Share your Server product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Make Server User a System Constant

There is no good way to get server user credentials into a workflow without asking them for it in an App interface.  It would be great if we could have a built in Constant that could be used to silently pass user credentials into a workflow for things like API's or logging user information.

37 Comments
hroderick-thr
11 - Bolide

@blyons  I use both methods and they work but are very hard to debug and won't copy from workflow to workflow because the tool name gets clobbered. Knowing who is running an app is very common to both security and results like sending generated emails to or from the user. Making it easy to know who is running the app empowers less skilled developers to build apps and more skilled developers to build them faster.

rcarog
8 - Asteroid

Thanks @blyons

We've resolved it by connecting to the MongoDB Users table and then creating a mapping table to assign the Active Directory ID to the user by the UserId

 

MJ
8 - Asteroid

Bump

jayj1000
7 - Meteor

Use the DCM.

hroderick-thr
11 - Bolide

@jayj1000 please explain how to get user running an app name and email from DCM.

seven
12 - Quasar

This post has gotten a little out of hand.

Have we all tried:

GetEnvironmentVariable('USERNAME')

A hundred percent of the time, this works every time.

 

If you want to build a Generate Rows:

<Configuration>
  <UpdateField value="False" />
  <UpdateField_Name />
  <CreateField_Name>username</CreateField_Name>
  <CreateField_Type>V_WString</CreateField_Type>
  <CreateField_Size>100</CreateField_Size>
  <Expression_Init>GetEnvironmentVariable('USERNAME')</Expression_Init>
  <Expression_Cond>!IsNull([username])</Expression_Cond>
  <Expression_Loop>Null()</Expression_Loop>
</Configuration>

 

hroderick-thr
11 - Bolide

@seven when I run an app from my gallery, username returns the run-as user, a system service account. I need to return an email to the person running the app, not the system service account, not the workflow developer. Changing general setting for the run-as is not an option.