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
saucoide
5 - Atom

any updates about this? it's been under review since 2017

TheodoreLindsey
7 - Meteor

The trick using 

__cloud:UserId

doesn't work anymore (as of 2019.3, from what I can tell).   If the old approach is going to be removed, we need a replacement solution.  Can we get an update on this?

JerseyJack
7 - Meteor

TheodoreLindsey I agree. Taking away this feature and not providing a robust replacement is a touch wreckless.

MattH
Alteryx
Alteryx

@TheodoreLindsey, I have confirmed that the __cloud:UserId function still works on 2019.3.

 

Here is a link to the workflow I used: https://www.dropbox.com/s/91a2728a521we3w/CloudID.yxwz?dl=0

 

Please Note: one of the most common oversights is adding __cloud:UserId to the annotation of the Text Interface tool.

 

cloudId.jpg

KylieF
Alteryx Community Team
Alteryx Community Team
Status changed to: Under Review

Thank you for posting to the Alteryx Community! I'm pushing this idea back to Under Review as this idea is still currently being reviewed by the Alteryx Development Team for a possible future release. This review process can take some time, we’ll do our best to keep you up to date on the status of your idea.

TheodoreLindsey
7 - Meteor

@MattH, I also got it working.  Thanks!

 

Hopefully we can get a more straightforward way to pull this (maybe as a function in the formula tool?) even if this approach is still working.  Maybe even something that doesn't require accessing Alteryx Server's DB from directly in the workflow?  

AlexBibin
8 - Asteroid

+100. It is a very important feature that'd help Alteryx server being a true enterprise grade product

cam_w
11 - Bolide

Python can do it ... here's the code from a Python tool that shows me the user running the workflow on the Alteryx Server:

 

from ayx import Alteryx

import os
import getpass
import pandas as pd

data = [[os.getlogin(), getpass.getuser(), os.environ['USERNAME']]]

cols = ["os.getlogin()", "getpass.getuser()", "os.environ['USERNAME']"]

df = pd.DataFrame(data,
                  columns=cols
                 )

Alteryx.write(df, 1)

 

janchan
6 - Meteoroid

Vote for this function +++

JerseyJack
7 - Meteor

that Pythod code is awesome. Hat off for sharing