【发布时间】:2018-09-11 18:39:58
【问题描述】:
我正在使用 ADAL4j 尝试对我们的本地共享点实例(它本身使用 AAD 作为企业应用程序进行身份验证)进行身份验证,以在通过标准流程进入时对用户进行身份验证。
我已将我的消费者 AAD 应用设置为需要“访问 {on prem sharepoint enterprise app}”的权限。然后我向如下所示的 url 发出请求:
https://login.microsoftonline.com/{tenant}/oauth2/authorize?
response_type=code&scope=user_impersonation&
response_mode=form_post&
redirect_uri={uri that is registered in my app}&
client_id={my app id}&
resource={onprem sharepoint enterprise app id}&
state={GUID}&nonce={GUID}
我收到的响应是 401 UNAUTHORIZED:
{
"error": "invalid_client",
"error_description": "Invalid audience Uri '{onprem sharepoint enterprise app id}'."
}
关于这里可能出现什么问题的任何想法?我的搜索并不是很有成效,从逻辑上讲,它似乎应该有效。企业应用程序方面是否有一些设置允许某些客户端访问资源?
感谢您的帮助!
【问题讨论】:
-
您是否在应用程序中添加了共享点资源
Permissions它请求访问?可以在settings刀片的 Azure 门户中完成。 -
是的。在应用程序(称为 search-api)中,我启用了对 sharepoint onprem 资源的访问。添加这个之后还有步骤吗?
标签: azure sharepoint azure-active-directory adal adal4j