Showing results for 
Search instead for 
Did you mean: 

alteryx server Discussions

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

Pulling the user info into the app from who ran it on the gallery

HI All,


I am hoping this is a silly question and there if a variable/constant I can drop into the workflow for this, but I want to bring the username of who is running the app into the workflow to dictate how the workflow runs. Does anyone know what that variable might be?


Workarounds I'd like to steer clear from:

- Handling the authentication through manually maintained authentication tables that I am comparing parameters I give the user (user, pw) . Clunky and multiple areas of authentication.

- Changing configuration of gallery to prompt for credentials before running app. I believe this would also require us granting privileges on the server to run apps for each user we would do this for. And I still think I'd have to use some run command to get that user info.


Any answers here are appreciated!





Hi @The_Dev_Kev_Env,


You can do this with a TextBox named __cloud:UserId


There is an idea at the moment under review to include this as a constant.



Hi @KaneG,


Quite the Easter Egg! Thanks for this.


One follow-up question. I am assuming the output is the subscriptionID of the user and I am trying to map that to the user collection in the MongoDB. What I am seeing is that the subscriptionID that is outputted and the one in the collection are off by the last digit (numerically a diff of 1-5). I'm wondering if this is a case of updated subscriptions/versioning...


Have you seen this before? Is this also the suggested route in getting the user information (joining ID to Mongo instance).


Gallery Output:



Mongo output:






Hi Kevin,


I have several app/gallery/collection reports I built.  What exactly are you trying to do?  Joining between different Mongo Collections can get convoluted very fast!!  If I knew exactly, I might have something already built that I can look into and let you know.


Hi @mbarone,


Thanks for the response. Actually came across a different thread where you provided a workflow to the parse through the user collection and grab the user id. Implemented that and works a like a charm.





Great, glad to hear it!!

@mbaroneone more quick question.


Are there other similar functions to the __cloud:UserId. In particular, can I get the collection information from where the app is being run from?





I only know about the cloud ID.  I think they're talking about adding a bunch more at some point in the future.


For Collections, I have a separate app that I run in the Gallery to see the different permutations of Collections/Users/App.  If it seems like something that might work for you, let me know:



Alteryx Certified Partner

Hi @The_Dev_Kev_Env,


It would be really useful if you could link to the solution you found for this. This issue is marked as 'solved' on the community but others are not able to find the answer from this thread.






@mbarone Would you mind sharing your Collections app? I'm looking to write the name of the workflow in addition to the user info to a sql server db table. Is there a way to capture the workflow name in the gallery?