【发布时间】:2021-08-03 19:14:20
【问题描述】:
我一直在阅读 PnPjs 页面,我需要了解它的作用: https://pnp.github.io/pnpjs/authentication/msaljsclient/#calling-sharepoint-via-msal 好像是:
import { MsalClientSetup } from "@pnp/msaljsclient";
import { sp } from "@pnp/sp/presets/all";
sp.setup({
sp: {
fetchClientFactory: MsalClientSetup({
auth: {
authority: "https://login.microsoftonline.com/mytentant.onmicrosoft.com/",
clientId: "00000000-0000-0000-0000-000000000000",
redirectUri: "https://mytentant.sharepoint.com/sites/dev/SitePages/test.aspx",
},
}, ["https://mytentant.sharepoint.com/.default"]),
},
});
const r = await sp.web();
是否为 SharePoint 应用程序提供了一个包装器,可能是一个模拟步骤,或者是为应用程序创建者提供一个允许其他用户提升权限的包装器?如果不是(哦,我希望),那它有什么作用?
【问题讨论】: