We have tried to make it easy for anyone scraping with Python to authenticate with and then save data to their OneDrive Excel Sheets
pip install this module
Authentication works via OAuth
You first need to create an app in your Microsoft azure portal - don't worry, its free!
The first time your generate your token you will be taken to OneDrive to accept the scope and permissions that your app will need to communicate with your OneDrive account. This token will then be saved locally.
Now that you have the token locally available to your python code you can run any of the available functions we have or create your own by looking at the microsoft graph API.
https://learn.microsoft.com/en-us/graph/api/table-post-rows?view=graph-rest-1.0&tabs=http