Accessing the logged in User name in a workflow on server
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Justin, we'll give that a go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@wwatson Please share the sample workflow and steps. It will be useful for many users