我使用了 https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/master/src/samples/public-client-app-sample/src/main/java/PublicClient.java 中的代码.唯一的区别是 CLIENT_ID 已更新。
我一直收到错误消息
"error_description":"AADSTS70002: The request body must contain the following parameter: 'client_secret or client_assertion'
我不确定如何以及在哪里指定它?管理员在客户端的配置中是否需要做些什么?
最佳答案
遇到了同样的问题,终于解决了。在我的例子中,我使用的是从开发控制台的 Web 应用程序部分复制的 Redirect URI(如常见的 Web URL),这使服务器“认为”请求来自 Web 客户端。从应用程序部分更改为 Redirect URI(格式为 urn:ietf:wg:oauth:2.0:oob ,这意味着它来自 native 客户端)后,我的 Android 应用终于可以运行了。
关于java - "error_description": "AADSTS70002: The request body must contain the following parameter: ' client_secret or client_assertion',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40858689/