SharePoint搜索加载项权限 [英] SharePoint Search Add-in permissions

查看:115
本文介绍了SharePoint搜索加载项权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要构建一个外接程序,该外接程序在SharePoint Online中使用搜索API,但是它将在SharePoint Online外部运行(即,当用户访问该应用程序时,它会以不同的凭据登录).这个想法是要求用户 在线登录到SharePoint(如果尚未登录),然后搜索查询将在其凭据下运行.

I have a requirement to build an add-in that uses the search API in SharePoint online, but it will run outside of SharePoint online (i.e., when the user accesses the app, it is logged under different credentials). The idea is that the user is required to log into SharePoint online (if it is not already logged in) and then the search query will run under its credentials.

我成功地使应用程序重定向到了"OAuthAuthorize.aspx"页面并请求用户同意"Web.Read"范围,然后显示有关注册该应用程序的网站的信息.但是,对于搜索,当我请求时 "Search.QueryAsUserIgnoreAppPrincipal"范围内,只有租户管理员才能信任该应用程序(甚至不注册该应用程序的网站的网站集管理员).

I was successfully able to have the app redirect to the "OAuthAuthorize.aspx" page and request user consent for "Web.Read" scope and then display information about the site where the app was registered. However, for search, when I request the "Search.QueryAsUserIgnoreAppPrincipal" scope, only a tenant administrator is able to trust the app (not even a site collection administrator of the site where the app is registered).

我该如何满足要求?有权直接在SharePoint在线网站中使用搜索的任何用户都不应授予"Search.QueryAsUserIgnoreAppPrincipal"允许使用某个应用程序?

How can I accomplish the requirement? Shouldn't any user who has permission to use search directly in the SharePoint online site be able to grant the "Search.QueryAsUserIgnoreAppPrincipal" permission to an app?

预先感谢.

推荐答案

您是否在外接清单文件中设置了权限?

Did you set permissions in the add-in manifest file?

<AppPermissionRequests>
  <AppPermissionRequest Scope="http://sharepoint/search" Right="QueryAsUserIgnoreAppPrincipal" />
</AppPermissionRequests>  

https://dev.office.com/sharepoint/docs /general-development/search-add-ins-in-sharepoint

最好的问候,

丹尼斯


这篇关于SharePoint搜索加载项权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆