是否有任何 API 来配置 Office 365 组站点? [英] Is there any API to provision the Office 365 Group Site?

查看:23
本文介绍了是否有任何 API 来配置 Office 365 组站点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在 OWA 中单击文件/站点时,它将重定向到如下所示的 SharePoint 页面:https://.sharepoint.com/_layouts/groupstatus.aspx?id=&target=documents

When we click the File/Site in OWA, it will redirect to a SharePoint page like this: https://.sharepoint.com/_layouts/groupstatus.aspx?id=&target=documents

在此页面中,如果群组网站不存在,则会创建 office 365 群组网站.

In this page, the office 365 group site will be created if the Group site is not existing.

与用户 OneDrive 站点一样,我们可以通过 Microsoft.SharePoint.Client.UserProfiles.PeopleManager.GetDefaultDocumentLibrary 对其进行配置那么指定组是否有任何 API 配置组站点?Microsoft Graph API、AAD Graph 或 SharePoint Client API,任何一种?

Like user OneDrive site, we can provision it via Microsoft.SharePoint.Client.UserProfiles.PeopleManager.GetDefaultDocumentLibrary So is there any API provisioning group site for specified group? Microsoft Graph API, AAD Graph or SharePoint Client API, any one?

当我在 Office 365 门户中创建 Office 365 组时,组网站将在几分钟后自动创建.但是当我在线或通过 MS Graph API 创建组交换时,无法创建组站点.当我尝试访问/groups/groupid/drive 时,出现此错误

And when I create an Office 365 Group in Office 365 Portal, the group site will be created automatically after some minutes. But when I create the group in exchange online or by MS Graph API, the group site cannot be created. When I try to access /groups/groupid/drive, I got this error

状态码:404

{错误": {"code": "ResourceNotFound","message": "资源配置正在进行中,请重试.",内部错误":{请求 ID":4f7e6581-4092-4fdb-834f-67c0b4f400b4",日期":2016-11-22T05:59:52"}}}

{ "error": { "code": "ResourceNotFound", "message": "Resource provisioning is in progress. Please try again.", "innerError": { "request-id": "4f7e6581-4092-4fdb-834f-67c0b4f400b4", "date": "2016-11-22T05:59:52" } } }

谢谢

推荐答案

通过 Microsoft Graph 创建组时,期望 SharePoint 网站立即可用.不幸的是,Microsoft Graph API 的设计方式允许在仅应用程序中创建组,而无需提供所有者.该方案在 SharePoint 中是一个错误方案,因为它会转化为匿名创建网站,并且不受支持.

When creating groups through Microsoft Graph the expectation is that the SharePoint site is immediately available. Unfortunately the way the Microsoft Graph API is designed it allows creation of a group in app-only without providing an owner. That scenario is a broken scenario in SharePoint, because it translates into anonymously create a site and that’s unsupported.

总之,如果你是在纯应用模式下调用 Microsoft Graph 来创建群组,请在创建时传递所有者,而不是作为后续操作发布群组创建.

In conclusion, if you are calling Microsoft Graph in app-only mode to create groups, pass the owner at creation time, not as subsequent operation post group creation.

在创建时的 JSON 有效负载中,您需要将其传递给

In the JSON payload on creation you need to pass this in

"owners@odata.bind": [
    "https://graph.microsoft.com/v1.0/users/{id}"
]

文档中对此进行了解释 https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/group_post_owners

This is explained here in the documentation https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/group_post_owners

这篇关于是否有任何 API 来配置 Office 365 组站点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆