0

我正在尝试创建架构扩展。我有令牌中的
“scp”:“Directory.AccessAsUser.All”。不知道它失败的原因。500尝试创建架构扩展时出错

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" 
} 
} 
} 
+0

仅供参考,请参阅本SO帖子:哪个图形API应该Azure的AD B2C使用(https://stackoverflow.com/questions/43770376/which-graph-api-should -be-used-azure-ad-b2c) – spottedmahn

回答

2

不幸的是,它看起来像微软图形架构扩展没有在B2C租户支持(请,如果你不使用B2C租户确认 - 在这种情况下,这可能是一个不同的问题)。与此同时(在我们解决此问题之前),您需要使用Azure AD Graph来注册和使用目录扩展。

希望这有助于

+0

是的,我使用B2C Tenant,按照Microsoft的建议,我使用的是Microsoft Graph而不是Azure AD Graph,我不想在两个不同的实现中使用我的应用程序为同一件事,所以我更喜欢使用Microsoft Graph。文档没有说什么,不使用B2C,糟糕的文档,这花了我3天的努力,并没有成功 –

+1

真的很抱歉。 B2C租户具有高度可扩展性,因此它具有一些我们错过(或未意识到)作为集成Microsoft Graph架构扩展的一部分的特殊功能。所以这对我们来说也有点意外(这也是为什么没有记录)。 –