Python Forum
How to handle the authentication for Apps within OneLogin? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: How to handle the authentication for Apps within OneLogin? (/thread-33062.html)



How to handle the authentication for Apps within OneLogin? - tonywang531 - Mar-26-2021

My company uses Office 365 within OneLogin. Therefore I need to log in to OneLogin first then sign into Office 365 (OneDrive). My question is how do I do the authentication for this in Python? I want to read the excel file stored in OneDrive directly. I tried to retrieve the data directly using python requests module with HTTPBasicAuth and HttpNtlmAuth only to get error 403.

I have checked about Python-saml. https://github.com/onelogin/python-saml However, I am not sure this is what I need. This seems more like create a server for OneLogin using Python. I have asked on the Microsoft forum about this problem but they say this is more Python related. What is the correct approach for doing this?


RE: How to handle the authentication for Apps within OneLogin? - tonywang531 - Jun-22-2021

I have not find a good way to solve my issue. However, I have achieved my goal using another approach. This is by using Selenium automation. So I open chrome_webdriver, access my company link, and click and log with username and password like a real human. If anyone has another way please let me know.