【发布时间】:2019-05-28 17:42:48
【问题描述】:
我正在尝试开发一个简单的应用程序,该应用程序将从 crontab 启动。
此应用程序必须连接到我的 Outlook (Office360) 日历并下载所有事件,然后我将插入到我的 MariaDb 中。
我认为这很容易,但在过去的 4 天里我失去了理智。
我尝试使用 NodeJs 关注 Microsoft doc,但我找不到静默模式(一种无需登录即可请求身份验证的模式)来接收令牌和数据。
然后我尝试以不同的方式使用 Python,首先使用 EWS,但我读到这将在未来被弃用,并且在过去 2 天我正在尝试使用 MSAL 和 ADAL。
MSAL 方法似乎更加分散,但是当我也使用acquire_token_by_username_password 或acquire_token_by_device_flow 启动脚本时,我仍然遇到这个问题
AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.
我的代码和 GitHub https://github.com/AzureAD/microsoft-authentication-library-for-python/tree/dev/sample 一样 我在 parameter.json 中更改我的配置并插入我的:
{
"authority": "https://login.microsoftonline.com/organizations",
"client_id": "ClinetIdOfApp Set in Azure",
"username": "myaccont@account.xx",
"scope": ["User.Read","Calendars.Read"],
"password": "MyPassword*****"
}
拜托,任何人都可以告诉我一些关于跳这块石头的建议吗? 谢谢
【问题讨论】:
标签: python azure adal office365api msal