Azure active directory Can';不要创建模式扩展
我正在尝试在Microsoft Graph API中创建模式扩展 但它已失败,错误消息为“属性类型对目标类型无效” 回应Azure active directory Can';不要创建模式扩展,azure-active-directory,microsoft-graph-api,Azure Active Directory,Microsoft Graph Api,我正在尝试在Microsoft Graph API中创建模式扩展 但它已失败,错误消息为“属性类型对目标类型无效” 回应 { "error": { "code": "BadRequest", "message": "Property type is invalid for target types.", "innerError&qu
{
"error": {
"code": "BadRequest",
"message": "Property type is invalid for target types.",
"innerError": {
"date": ...,
"request-id": ...,
"client-request-id": ...
}
}
}
为什么我不能创建架构扩展以及错误的含义?基于的事件不支持在
属性中键入
您可以将它们更改为字符串
请注意,您可能会遇到新错误:尝试更新应用程序上的复杂扩展定义:dexxxx5-d9f9-48b1-a8ad-b7xxxxx25064,属于不同的上下文。
如果出现此错误,则意味着您仍然需要在JSON负载中放置owner
属性。(如果没有收到此错误,则不必放置owner
属性)
注册Azure广告应用程序,并将应用程序id作为所有者
POST https://graph.microsoft.com/v1.0/schemaExtensions
Content-type: application/json
{
"id":"extendedData",
"description": "Graph Learn training courses extensions",
"targetTypes": [
"Event"
],
"owner": "{application id of an Azure AD app}",
"properties": [
{
"name": "courseId",
"type": "String"
},
{
"name": "materialId",
"type": "String"
},
{
"name": "courseType",
"type": "String"
}
]
}
谢谢你的回答。这对我来说很有效,而且owner
属性是自动创建的。@hotcakedev很高兴知道这一点。如果我的回答对你有帮助,你可以接受它作为答案。谢谢:)是什么原因导致事件
目标类型不支持整型
属性类型?@hotcakedev抱歉,我不确定。我试图在通过修补事件创建新事件时使用此创建的架构扩展。但是它显示了一个错误“模型无法解析名为'Microsoft.OutlookServices.OpenTypeExtension'的类型。当模型可用时,每个类型名称必须解析为有效类型。”
。为什么会发生这种情况?
POST https://graph.microsoft.com/v1.0/schemaExtensions
Content-type: application/json
{
"id":"extendedData",
"description": "Graph Learn training courses extensions",
"targetTypes": [
"Event"
],
"owner": "{application id of an Azure AD app}",
"properties": [
{
"name": "courseId",
"type": "String"
},
{
"name": "materialId",
"type": "String"
},
{
"name": "courseType",
"type": "String"
}
]
}