Microsoft Graph API url 与 SharePoint ALM REST API

问题描述

Microsoft graph urls 和 SharePoint rest api urls 是这样的

https://graph.microsoft.com/v1.0/sites  - https://{tenant-name}.sharepoint.com/_api/v2.0/sites
https://graph.microsoft.com/v1.0/drives - https://{tenant-name}.sharepoint.com/_api/v2.0/drives
https://graph.microsoft.com/v1.0/drive  - https://{tenant-name}.sharepoint.com/_api/v2.0/drive
https://graph.microsoft.com/v1.0/lists  - https://{tenant-name}.sharepoint.com/_api/v2.0/lists

我使用图形 api 为共享点生成访问令牌,需要知道以下对应的图形 url

https://{tenant-name}.sharepoint.com/_api/web/{scope}appcatalog/AvailableApps

例如“https://graph.microsoft.com/v1.0/sites/web/tenantappcatalog/”

解决方法

目前,graph api 没有这样的端点。

您必须使用 sharepoint rest api 来获取信息:https://docs.microsoft.com/en-us/sharepoint/dev/apis/alm-api-for-spfx-add-ins?tabs=sprest

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...