We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Server Discussions

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

Accessing the logged in User name in a workflow on server

12 - Quasar

We have a use case where we want to use the logged in user name on server to restrict what a workflow shows them.




We don't want the extract the server's own user but the user name of the person logged in and use that in the workflow to filter the output.


In my case that would be my name as shown.


Does anyone know how to access the Alteryx server logged in user name from within a workflow?




There is a way to use the UI Text Box tool to collect the Username of the user running the application. This is achieved when masking the Text Box tool (for API development) and naming it " __cloud:UserId". 


Attaching this Text Box to another tool, such as a Text Input, will allow the value to be used downstream. 


Check out @patrick_digan's response here for a screenshot: 



Justin Babbitt

Justin Babbitt
Strategic Customer Success Manager
12 - Quasar

Thanks Justin, we'll give that a go.

12 - Quasar


Your guidance got me to the user id. I added an extra piece to extract the username from the Alteryx Mongo DB, then used a render tool to display it on server as pcxml. Works a treat.




6 - Meteoroid

Hi ,


I have a requirement to show the stored procedure result basis on the user ID in alteryx app not in the workflow. As many users may run the aateryx app (not workflow) from the gallery and respective output to be shown in the result only to that specific user


Could anyone help on this,please ?


Thank you 

6 - Meteoroid

On continuation of the above query, also in our gallery, always the user names as for example "Alteryx Finance". At this time, how to validate? Pls help


7 - Meteor

Hi Justin.  I'm trying to make this connection and what I pull from the mongo input doesn't match from the text box.  Is your mongo input connecting as User, AlteryxGallery, and then the Users table as below?



8 - Asteroid

Hi, would you be able to upload this portion of your workflow if you don't mind? Trying to work through a similar issue of collecting the user's user ID from the server. Thank you!

5 - Atom

@JustinBabbitt Thanks for the information.


It works for me as well. However the returned user id is not exactly the user SubscriptionId as stored in MongoDB. The returned id = SubscriptionId + 3 (i.e., instead of 63xxxxxxxxxxxxxf635 the Text Box tool return 63xxxxxxxxxxxxxf638. I tested this with few users.

I did not see any comment on this. So I am wondering whether this is specific to our settings or not.





7 - Meteor

@wwatson Please share the sample workflow and steps. It will be useful for many users