SSO via Python

TLDR: How do you incorporate SSO into the Asana Python module?

I’m writing a Python app using the latest Asana Python package. My org has recently put heavy restrictions on acquiring PAT’s which is how I was authenticating, but the new restrictions make that impractical since you need design documentation to get one. Not the user experience I’m looking for.

I’m ok with using user/password logging for my users, but my org also uses corp-managed SSO which I’m not familiar with how to use and there doesn’t seem to be an easy way built into the Python package to do it and I’m assuming the method provided is for a native Asana log-in.
I’m not 100% sure on this, so I’m looking for some information on this before I start rewriting my program into a dead-end.

@Geoff_Hellstrand - here’s the guide on authorization for apps. I don’t think SSO vs. password/email as your platform authentication method should have any bearing on authenticating in your app (that’s also a separate setting from PAT restrictions in the admin console). If you can’t use PATs, you would use OAuth (which you’d generally want to do for a deployed app anyway to maintain security).

1 Like

For clarification, this isn’t a deployed app. This is an independent python script run from the command line directly with python.

I’m using it for data retrieval only to generate a report.

I want the report to reflect the access of the user running the script.

Hi @Geoff_Hellstrand, I’m not sure if I completely understand the question, but the link @Stephen_Li shared has all of the available authentication / authorization mechanisms and user/password (Basic auth?) is not supported for the API.

For one application that many users access, OAuth is the best option but it would require a light backend to store secrets and manage the handshake. The upside to that is that your organization may approve your app once and then all other users may authorize it.

1 Like