首页 > 解决方案 > 无法从图形资源管理器将组添加到我的天蓝色活动目录

问题描述

我正在尝试使用 URL
https://graph.microsoft.com/v1.0/groups和 JSON 正文从 Graph Explorer 将组添加到我的 Azure Active Directory

{
  "description": "Group with designated owner and members",
  "displayName": "Operations group",
  "groupTypes": [
    "Unified"
  ],
  "mailEnabled": true,
  "mailNickname": "operations2019",
  "securityEnabled": true,
  "owners@odata.bind": [
    "https://graph.microsoft.com/v1.0/users/{user object id}"
  ],
  "members@odata.bind": [
    "https://graph.microsoft.com/v1.0/users/{user object id}"
  ]
}

但抛出错误消息如下


{
    "error": {
        "code": "MethodNotAllowed",
        "message": "Method not allowed.",
        "innerError": {
            "request-id": "ba759d0f-3585-4d65-b1e1-204de53186ad",
            "date": "2019-11-19T13:37:46"
        }
    }
}

但我可以得到一个成功的回应https://graph.microsoft.com/v1.0/me

请帮我。我错过了什么?

标签: azure-active-directorymicrosoft-graph-api

解决方案


我找到了日志(感谢您提供请求 ID 和时间戳!),看起来该请求是针对消费者帐户(例如 outlook.com 或 live.com)而不是组织帐户的。

根据https://docs.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http POST /groups 上的文档,MSA 不支持。

如果您有工作/学校帐户,您可以使用该帐户登录 Graph explorer 吗?


推荐阅读