500尝试创建架构扩展时出错

时间:2017-07-17 13:10:32

标签: azure-active-directory microsoft-graph azure-ad-b2c azure-ad-graph-api

我正在尝试创建架构扩展。我确实有 " scp":" Directory.AccessAsUser.All"在令牌中。不知道它失败的原因是什么。

https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/schemaextension_post_schemaextensions

POST https://graph.microsoft.com/beta/schemaExtensions
Content-type: application/json

{
"id":"courses",
"description": "Graph Learn training courses extensions",
"targetTypes": [
    "Group"
],
"properties": [
    {
        "name": "courseId",
        "type": "Integer"
    },
    {
        "name": "courseName",
        "type": "String"
    },
    {
        "name": "courseType",
        "type": "String"
    }
]
}

错误:

 {
  "error": {
"code": "Service_InternalServerError",
"message": "Encountered an internal server error.",
"innerError": {
  "request-id": "1909aef3-b66d-48de-8204-0a41df0a27a8",
  "date": "2017-07-17T13:07:20"
}
 }
 }

1 个答案:

答案 0 :(得分:2)

不幸的是,B2C租户不支持Microsoft Graph架构扩展(请确认您是否使用B2C租户 - 在这种情况下,这可能是另一个问题)。

与此同时(在我们解决此问题之前),您需要使用Azure AD Graph注册和使用目录扩展。

希望这有帮助,