无法使用 Microsoft Graph 添加应用程序分配 API
Unable to add application assignment using Microsoft Graph API
在使用图表 API 创建将应用程序分配给 Azure Intune 中的 AD 组的请求时,我收到以下响应。
{ "error": {
"code": "ModelValidationFailure",
"message": "Cannot create an abstract class.",
"innerError": {
"message": "Cannot create an abstract class.",
"request-id": "removed",
"date": "removed"
} }}
这是我的 post 数据
{ "@odata.type": "#microsoft.graph.mobileAppAssignment", "intent": "required", "target": { "@odata.type": "microsoft.graph.groupAssignmentTarget", "groupId": "removed" }, "settings": { "@odata.type": "microsoft.graph.mobileAppAssignmentSettings"}}
这是我用来生成 json 数据的参考:https://docs.microsoft.com/en-us/graph/api/intune-apps-mobileappassignment-create?view=graph-rest-beta
而且我不确定这是否与我的 json 输入有关,或者图表 api 端点是否有问题。
microsoft.graph.mobileAppAssignmentSettings is an abstract class. You'll need to provide a concrete implementation of assignment settings e.g. microsoftStoreForBusinessAppAssignmentSettings or iosStoreAppAssignmentSettings.
您的 post 数据在这种情况下可能是:
{
"@odata.type": "#microsoft.graph.mobileAppAssignment",
"intent": "required",
"target": {
"@odata.type": "microsoft.graph.groupAssignmentTarget",
"groupId":"removed"
},
"settings": {
"@odata.type": "microsoft.graph.microsoftStoreForBusinessAppAssignmentSettings",
"useDeviceContext":"true"
}
}
在使用图表 API 创建将应用程序分配给 Azure Intune 中的 AD 组的请求时,我收到以下响应。
{ "error": {
"code": "ModelValidationFailure",
"message": "Cannot create an abstract class.",
"innerError": {
"message": "Cannot create an abstract class.",
"request-id": "removed",
"date": "removed"
} }}
这是我的 post 数据
{ "@odata.type": "#microsoft.graph.mobileAppAssignment", "intent": "required", "target": { "@odata.type": "microsoft.graph.groupAssignmentTarget", "groupId": "removed" }, "settings": { "@odata.type": "microsoft.graph.mobileAppAssignmentSettings"}}
这是我用来生成 json 数据的参考:https://docs.microsoft.com/en-us/graph/api/intune-apps-mobileappassignment-create?view=graph-rest-beta
而且我不确定这是否与我的 json 输入有关,或者图表 api 端点是否有问题。
microsoft.graph.mobileAppAssignmentSettings is an abstract class. You'll need to provide a concrete implementation of assignment settings e.g. microsoftStoreForBusinessAppAssignmentSettings or iosStoreAppAssignmentSettings.
您的 post 数据在这种情况下可能是:
{
"@odata.type": "#microsoft.graph.mobileAppAssignment",
"intent": "required",
"target": {
"@odata.type": "microsoft.graph.groupAssignmentTarget",
"groupId":"removed"
},
"settings": {
"@odata.type": "microsoft.graph.microsoftStoreForBusinessAppAssignmentSettings",
"useDeviceContext":"true"
}
}