0

我正在为我的SharePoint Online站点创建一个SP设计器工作流,以获取用户属性,如经理名称,位置,部门等。我正在使用下面的REST URL'Call HTTP web服务”行动尝试使用用户配置文件REST API访问用户属性

https:/siteurl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor([email protected],propertyName='Manager')[email protected]=%27i:0%23.f|membership|userid%27 . 

我是网站集管理员,但仍然我得到错误 -

"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}" 

我已完全控制工作流应用程序。但是当我在浏览器中访问上面的REST URL时,我可以看到任何用户的所有属性。

请让我知道我在哪里犯了一个错误。

回答

1

工作流程必须tenant-level permissions(In your case-Read)才能访问用户配置文件服务而无需在网站集的完全控制

当赋予的权利请确保以下使用XML:

<AppPermissionRequests> 
    <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="Read" /> 
</AppPermissionRequests> 

这里是有用的链接

+0

这里是使用XML:' ' – Hybris95

相关问题