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