Getting a Sharepoint site collection's owner with Graph

泄露秘密 提交于 2019-12-13 22:52:05

问题


How do I get a Sharepoint Online site collection's owner with the Graph API?

This page of the documents seems to suggest that getting a site collection's root site returns its owner, however it didn't work when I tested it in Graph Explorer.

Am I missing some parameters, are there other APIs, or is it simply impossible?


回答1:


Am I missing some parameters

No

are there other APIs

No

or is it simply impossible?

It is possible, but the api is still in development. Current endpoint is primarily intended to preview and evaluation.

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

The response format for stable version endpoint:

{
  "id": "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE",
  "displayName": "OneDrive Team Site",
  "name": "1drvteam",
  "createdDateTime": "2017-05-09T20:56:00Z",
  "lastModifiedDateTime": "2017-05-09T20:56:01Z",
  "webUrl": "https://contoso.sharepoint.com/teams/1drvteam"
}

For production scene, please following the production version.



来源:https://stackoverflow.com/questions/52756656/getting-a-sharepoint-site-collections-owner-with-graph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!