1

I want to read all the Outlook Task assigned to the logged in user from with an Office365 web part (SPFX), But I do not want the user to sign in again or do any such operation, Ideally what I want is to use SharePoint context to be used to authenticate the user.

I came across the GraphHttpClient which uses /_api/SP.OAuth.Token/Acquire to acquire an access token which can be used with Microsoft Graph but, by default, this method only issue Group.ReadWrite.All and Reports.Read.All permission.

I need to grant it Tasks.Read permission.

I was wondering if there is any way to pass the Scope into the method to get an updated token?

I have already tried passing Scope as a query string to URL and as a header, both yielded me no result. Any suggestions on how to tackle this issue will be helpful.

4

1 回答 1

1

GraphHttpClient弃用,您想改用新的MSGraphClient

默认情况下,MSGraphClient除了User.Read. 但是,它确实支持向租户管理员请求额外的权限范围。可以在 SharePoint 框架解决方案中连接到 Azure AD 保护的 API 中找到有关其工作原理的概述。

于 2018-04-16T22:00:20.357 回答