Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Accessing DCM credentials from within the Python tool

Drussek
9 - Comet

I have stored connection and credentials to connect to DB in Connection Manager (Alteryx Desktop with DCM turned on)].

I can use this in input tools and it works fine, but how to use it in Python Tool?
Is there a way to get at least a password directly in Python, or pass it as a parameter to Python Tool?

 

If there is no such option, how do you securely store such passwords?

One opition is to store them in an environment variable but it isn't too secure.

I tried using the local Windows password repository and using https://github.com/bobpeers/Alteryx_SDK_Credentials but I have a problem with it.

 

I am wondering what else you use.
Thanks in advance for your help

7 REPLIES 7
AshRez
8 - Asteroid

Any answer on that yet? I would love to know how to securely use Python to upload files to SharePoint using the DCM credentials or connections.

Gregory_John
6 - Meteoroid

Also looking for a solution to this.


I've only been able to get DCM working for basic file access via input tools or for connector tools like SharePoint or Tableau — not for credential storage in Python or Download tools. The SharePoint Connector and Tableau Connectors specific implementations feel overly complex and not very intuitive.

 

Would love to know if anyone has found a clean way to securely access stored credentials in the Python tool, especially in locked-down corporate environments where things like GitHub or ENV vars aren't viable.

AshRez
8 - Asteroid

I did manage to create a python scripts that will authenticate and work with SharePoint to List, download and upload (3 scripts), it was a lot better than what can be done on the Alteryx SharePoint tool. The only drawback was the security issue with the credentials, but for this you can lock your workflow, or if you put the python in a macro will be much better, as you will only need to lock the macro.

here is how to lock the macro. Lock Your Workflow

You will not be able to unlock it, so make sure you have a copy of your own before you lock it.
once it is locked, open the workflow file in text editor to confirm and check if you can see the credentials or is it showing encrypted.

I used text Input tool to add the credentials and pass it to Python. also I used Client ID and Secret, as it is more complicated if you use your own credentials. 

AshRez_0-1754415340176.png

 

Gregory_John
6 - Meteoroid

Thanks for sharing this, and it definitely feels like a solid workaround, especially using a macro to help lock things down. I hadn’t considered that approach, so I appreciate the insight.

 

That said, it’s still surprising that Alteryx doesn’t offer a native, secure way to manage credentials for use in the Python tool. For a platform that’s so versatile, it’s kind of a “jack of all trades, master of none” situation when it comes to credential security. It’s entirely possible that DCM has this functionality and it should be accessible across tools, but I’ve gone down this rabbit hole a few times and never found a real solution.

 

Hopefully this is something Alteryx addresses more directly in future releases.

apathetichell
20 - Arcturus

1) DCM is not great.

2) Alteryx's python tool is not great.

 

It's not too surprising that the two don't work. You should be storing credentials in a cloud secret store (AWS,  GCP, Azure, Vault, whatever)--- and Alteryx should be connecting to that store vs storing it internally.

 

Alteryx's python tool should have a bring your own VENV. The 'we have our own venv which you have to use' might have been fine in 2018 --- but it does not make sense today. package management? that's what uv is for.

AshRez
8 - Asteroid

surprisingly with the amount of money they take annually on this, and the support and improvement are so poor.

abhilash_t
6 - Meteoroid

After several weeks of back-and-forth with Alteryx Support regarding the configuration of Azure Key Vault as a Generic Key Vault, they ultimately closed the case, stating that they only support the three listed key vaults. It’s surprising and quite odd that Azure Key Vault is not supported.

Labels
Top Solution Authors