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?
Solved! Go to Solution.
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:
https://community.alteryx.com/t5/Alteryx-Designer/Get-username-Cloud-not-working/td-p/518481
Cheers,
Justin Babbitt
Thanks Justin, we'll give that a go.
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.
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
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
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?
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!
@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.
Regards,
Francois
@wwatson Please share the sample workflow and steps. It will be useful for many users