【发布时间】:2019-03-22 05:03:48
【问题描述】:
在尝试通过 Active Directory 进行身份验证以检索访问令牌时,我执行了以下步骤:
1 - 使用以下说明在 Azure 中创建了一个应用程序(步骤 3): https://github.com/Azure-Samples/active-directory-java-native-headless#step-3--register-the-sample-with-your-azure-active-directory-tenant
2 - 创建了一个具有“数据工厂参与者”权限的“Azure Active Directory”用户帐户。
3 - 使用(以下网址)中的步骤,我按照示例代码尝试检索访问令牌: https://github.com/Azure-Samples/active-directory-java-native-headless/blob/master/src/main/java/PublicClient.java
注意:我使用的资源是... https://management.core.windows.net/
4 - 服务器响应以下错误:
Exception in thread "main" java.util.concurrent.ExecutionException:
com.microsoft.aad.adal4j.AuthenticationException:
{
"error_description": "AADSTS65001: The user or administrator has not
consented to use the application with ID '<my-app-id>' named
'<my-app-name>'. Send an interactive authorization request for this
user and resource.\r\nTrace ID: d0af56e6-aaa3-4d25-b23b-
2984ed2b4400\r\nCorrelation ID: 2422cc2f-1cdd-45c5-8b7c-
46b1eee4ffae\r\nTimestamp: 2019-03-22 04:58:16Z",
"error": "invalid_grant"
}
需要哪些授权才能使身份验证正常工作?
【问题讨论】:
-
我的回答解决了你的问题吗?
-
是的! :-) 再次感谢您抽出宝贵时间回复。
标签: java azure azure-active-directory azure-data-factory azure-data-factory-2