Python API/Rest API and authentication with SSO enabled

Hi Patrick, this is really helpful thanks. But we still have an issue here and I’m hoping you can help.

When we launch our DCCs, we don’t do so from SG Desktop but from our own launching app (we don’t use any of the engines either e.g. tk-maya etc). Then from inside Maya (for example), we then use Toolkit to talk to SG when we need to. We do something like this to get the user:

ShotgunAuthenticator().get_user()

Now, if the user is logged into SG Desktop before they launch Maya, then this code works fine. But if not, then it won’t (since the Autodesk login change). I can’t replace it with code that uses the method you posted above, because in Maya 2018 (for example) it’s the wrong PySide version. And in any case, I don’t really want to launch the login dialog each time a DCC is started.

So what we really need is for our custom launching app to be able to ensure the user is logged in and for that login to persist when DCCs are launched etc.

Like I say, if a user logs in through SG Desktop (or SG Create) then that login persists and they don’t have to log in again. If they launch Maya, then our code can get gold of the session user with ShotgunAuthenticator().get_user().

But using your code above, although it works to log in and access SG, the login doesn’t persist the way it does when logging in through SGD etc.

That’s what we really need to be able to do, so we’re not replying on all users to log in through SGD before they can use our tools.