如果当前站点的基础 o365 组是 public 或私有,如何检查 Sharepoint spfx 组件?

How to check in sharepoint spfx component if underlying o365 group of current site is public or private?

是否可以在 spfx 组件中使用 jsom 以某种方式检查它?

否则我需要调用一个外部服务,它会依次调用图 api,我正在努力避免这种情况。但是,如果这是要走的路,那么获取群组 ID 或名称的最佳方式是什么?

提前致谢。

@塔拉斯,

我无意中发现了这个属性,我认为它符合您的要求:

Request URL: https://abc.sharepoint.com/sites/testprivate/_api/web?$select=AllProperties&$expand=AllProperties

我还检查了一个 public Office 365 组站点,它非常适合。

BR