python上传文件到onedrive_使用Python从个人OneDrive下载文件

本文介绍了一种通过Python脚本实现自动从个人OneDrive下载和上传文件的方法。利用Microsoft Graph API,创建Azure AD应用,配置权限,并通过刷新令牌实现无用户交互的持续同步。文中详细阐述了配置过程和Python实现步骤。
摘要由CSDN通过智能技术生成

I have a Python script that is running periodically on an AWS EC2 Ubuntu machine.

This script reads data from some files and sometimes changes data in them.

I want to download these files from OneDrive, do my own thing with them, and upload them back to OneDrive.

I want this to be done automatically, without the need for a user to approve any login or credentials. I'm ok with doing it once (i.e. approving the login on the first run) but the rest has to run automatically, without asking ever again for approvals (unless the permissions change, of course).

What is the best way to do this?

I've been reading the documentation on Microsoft Graph API but I'm struggling with the authentication part. I've created an application in Azure AAD, gave the sample permissions (to test) and created a secret credential.

解决方案

I managed to do it. I

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值