# SAML Login with Okta in python

**URL:** <https://devforum.okta.com/t/saml-login-with-okta-in-python/33041>\
**Category:** SAML\
**Tags:** python\
**Created:** [May 2, 2025, 10:06pm UTC](https://devforum.okta.com/t/saml-login-with-okta-in-python/33041 "2025-05-02T22:06:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheScriptGuy](https://avatars.discourse-cdn.com/v4/letter/t/57b2e6/32.png) [@TheScriptGuy](https://devforum.okta.com/u/TheScriptGuy)\
**Post date:** [May 2, 2025, 10:06pm UTC](https://devforum.okta.com/t/saml-login-with-okta-in-python/33041/1 "2025-05-02T22:06:23Z")

</div>

Hi,

I have a public explicit proxy that redirects to Okta in order to login. I’m trying to figure out a way to use a python script to be able to handle the SAML login and then proceed to request the proxy to browse to a website. I suspect that once the login is accepted, there’s another token that needs to be attached to each web request to validate the authentication to be able to browse.

How can I handle this in a python script? I can figure out the proxy aspect of the browsing, I just don’t know a good way to handle the SAML authentication component.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [June 1, 2025, 10:06pm UTC](https://devforum.okta.com/t/saml-login-with-okta-in-python/33041/2 "2025-06-01T22:06:49Z")

</div>

Closed on June 1, 2025, 10:06pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
