ROPC 流程:请求正文必须包含以下参数:'client_assertion' 或 'client_secret'
ROPC flow: The request body must contain the following parameter: 'client_assertion' or 'client_secret'
我正在测试 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 时遇到了同样的问题。请检查 SO 社区帮助我解决问题的地方。在 curl 请求中添加应用程序注册密码后,我获得了有效的令牌并且能够获取邮件。
令我困惑的是 secret 不存在于 parameters.json 文件中。
您错过了此 link 中的第 6 步:https://github.com/Azure-Samples/ms-identity-python-desktop/tree/master/1-Call-MsGraph-WithUsernamePassword
如果应用程序设置为 Public Client
,则不需要密码。
更多详情,您可以阅读https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc#authorization-request以供参考。
我正在测试 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 时遇到了同样的问题。请检查
令我困惑的是 secret 不存在于 parameters.json 文件中。
您错过了此 link 中的第 6 步:https://github.com/Azure-Samples/ms-identity-python-desktop/tree/master/1-Call-MsGraph-WithUsernamePassword
如果应用程序设置为 Public Client
,则不需要密码。
更多详情,您可以阅读https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth-ropc#authorization-request以供参考。