无法建立团队

时间:2020-07-16 12:45:39

标签: microsoft-graph-api microsoft-teams microsoft-graph-teams

在Teams上创建团队时,Microsoft Graph API出现问题。我得到的唯一答复是:禁止。没有其他错误信息/说明。

请求如下:

    PUT : https://graph.microsoft.com/v1.0/groups/<groupId>/team

    header : {
      'Accept-Encoding' => 'gzip, deflate, br',
      'Authorization' => 'Bearer <tokeSTRING>
    }

    request parameter : {  
      "memberSettings": {
        "allowCreateUpdateChannels": true
      },
      "messagingSettings": {
        "allowUserEditMessages": true,
        "allowUserDeleteMessages": true
      },
      "funSettings": {
        "allowGiphy": true,
        "giphyContentRating": "strict"
      }
    }

响应:

{
  "error": {
    "code": "Forbidden",
    "message": "Forbidden",
    "innerError": {
      "date": "2020-07-15T09:42:47",
      "request-id": "<requestId>"
    }
  }
}

在Azure上,我已经向应用程序授予了创建组/团队的权限,如路由页面所述:https://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-1.0&tabs=http

有人遇到同样的问题吗?

1 个答案:

答案 0 :(得分:0)

我想,您的请求应仅包含以下代码

{  
    "memberSettings": {  
        "allowCreateUpdateChannels": true  
    },  
    "messagingSettings": {  
        "allowUserEditMessages": true,  
        "allowUserDeleteMessages": true  
    },  
    "funSettings": {  
        "allowGiphy": true,  
        "giphyContentRating": "strict"  
    }  
}  

像往常一样输入PUT命令

https://graph.microsoft.com/v1.0/groups/<groupId>/team