azure - SharePoint 框架 AadHttpClient - 操作是实验性功能的一部分

标签 azure sharepoint azure-active-directory sharepoint-online spfx

我正在尝试使用 SPFx 附带的 AadHttpClient 库连接到由 Azure AD 中的应用注册保护的自定义 API。

但是,当我在工作台、SharePoint Online(在租户_layouts 中)中运行 Web 部件时,我在控制台中收到一条错误消息,指出该功能是实验性的。

错误:请求的操作是当前环境不支持的实验性功能的一部分。

据我所知 this article ,应该是一般版本。

When connecting to Azure AD-secured APIs, we recommend that you use the MSGraphClient and AadHttpClient classes, which are now generally available. For more information about the recommended models, see Connect to Azure AD-secured APIs in SharePoint Framework solutions and Use the MSGraphClient to connect to Microsoft Graph.

当我进入 SP 管理站点中的 API 管理页面时,我会看到一个弹出窗口,指出

***Access to Azure Active Directory resources using the SharePoint Framework will be available soon.

所以我有点困惑。

我还在 API 管理页面上收到一条错误消息:..

A null value was found with the expected type 'Edm.String[Nullable=False]'. The expected type 'Edm.String[Nullable=False]' does not allow null values.

当我尝试在 PowerShell 中运行时,我也遇到了同样的错误

Get-SPOTenantServicePrincipalPermissionRequests

我不能 100% 确定我了解 API 管理页面的相关性 - 管理员是否只需为 Web 部件批准一次,然后所有用户就可以使用了?

最佳答案

我也遇到了同样的问题。 github线程可以找到here 。对我来说解决这个问题的方法是添加我用作网站集管理员的帐户。

Connect-SPOService
Set-SPOUser -Site https://TENANT-admin.sharepoint.com -IsSiteCollectionAdmin $True -LoginName yourLoginName

关于azure - SharePoint 框架 AadHttpClient - 操作是实验性功能的一部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52208310/

相关文章:

尽管所有操作都已完成,但 Sharepoint 工作流仍为 "in progress"

javascript - Sharepoint 2013 CSOM 从自定义 ListView 项目表单获取项目属性

azure - 如何在新门户中捕获Azure虚拟机的图像?

c# - Azure WebJob不触发队列

visual-studio - Microsoft Office Communicator 随机获得焦点

Azure AKS 用户凭据登录 K8 仪表板和 RBAC 内置角色

asp.net-web-api - Azure AD/B2C 用户的安全 API

azure - AD OIDC 未返回 user_role

azure - 执行暂停 Azure SQLDatawarehouse ps 脚本时出错

Azure 机器学习-Azure Blob 存储