Microsoft Graph不会检索组的计划ID [英] Microsoft Graph does not retrieve the Group's Plan Id

查看:126
本文介绍了Microsoft Graph不会检索组的计划ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在主体上使用POST /v1.0/groups创建组后:

After creating a Group using POST /v1.0/groups with the body:

{
    "description": "hello",
    "displayName": "group_for_restore",
    "groupTypes": [
        "Unified"
    ],
    "mailEnabled": true,
    "mailNickname": "group_for_restore",
    "securityEnabled": false,
    "visibility": "Public"
}

GET /v1.0/groups/{group-id}/planner/plans的请求不会检索任何计划.

A request to GET /v1.0/groups/{group-id}/planner/plans does not retrieve any plans.

据我所知,在创建组后,还将创建一个计划.在Web界面上,您可以看到该计划已正确创建和显示,但未显示在JSON响应中:

As far as I know, after creating a Group, a Plan will be created too. On the web interface you can see that this plan is correctly created and shown, but it does not appear in JSON response:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.plannerPlan)",
    "@odata.count": 0,
    "value": []
}

在网络界面中单击它之后,您可以使用上面的请求轻松获得该计划.

After clicking on it in the web interface you can easily get the plan using the request above.

可以采取这样的魔术步骤来获取计划ID吗?

Is it ok to do such magic steps to fetch plan id?

推荐答案

首次尝试访问Web App时,该Web App正在为其配置组计划".但是,通过API创建网上论坛时,您需要自己创建一个新的计划:

The Web App is provisioning the Group's Plan the first time you attempt to access it. When creating a Group through the API however, you'll need to create a new Plan yourself:

POST https://graph.microsoft.com/v1.0/planner/plans
Content-type: application/json

{
  "owner": "group-id",
  "title": "title-value"
}

请记住

在创建新计划时,只需在计划对象上设置owner属性,即可将其设为组的所有者.

When creating a new plan, make a group its owner by simply setting the owner property on a plan object.

这篇关于Microsoft Graph不会检索组的计划ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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