问题描述
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