Python Forum

Full Version: How to handle the authentication for Apps within OneLogin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.