我正在测试MSAL和ROPC流。当我运行示例https://github.com/Azure-Samples/ms-identity-python-desktop时,会得到错误:
python username_password_sample.py parameters.json
invalid_client
AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.在跟踪MS文档和使用curl时,我也遇到了同样的问题。请检查my other question在哪里,所以社区帮助我解决问题。在curl请求中添加应用程序注册秘密后,我获得了有效的令牌,并能够获取邮件。
让我困惑的是,机密并不存在于parameters.json文件中。
发布于 2020-04-17 02:32:02
您错过了该链接的第6步:https://github.com/Azure-Samples/ms-identity-python-desktop/tree/master/1-Call-MsGraph-WithUsernamePassword

如果应用程序被设置为Public Client,则不需要这个秘密。
有关更多细节,您可以阅读https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc#authorization-request作为参考。

https://stackoverflow.com/questions/61245406
复制相似问题