microsoftgraph / microsoftgraph/msgraph-sdk-powershell
New-MgDeviceManagementDeviceConfiguration always throws Cannot create an abstract class.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
I am trying to create a Windows10 Custom Configuration but It keeps returning "Cannot create an abstract class"
Expected behavior
Create and return the Device Configuration
How to reproduce
- Execute
Connect-MgGraph -Scopes @("deviceManagement.ReadWrite.All") - Create body hashtable
$body = @{
"@odata.type" = "#microsoft.graph.windows10CustomConfiguration"
description = "Description value"
displayName = "Display Name value"
version = 7
omaSettings = @(
@{
"@odata.type" = "microsoft.graph.omaSetting"
displayName = "Display Name value"
description = "Description value"
omaUri = "Oma Uri value"
}
)
}
- Execute
New-MgDeviceManagementDeviceConfiguration -BodyParameter $body
SDK Version
2.16.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
- PSVersion: 7.4.1
- PSEdition: Core
- GitCommitId: 7.4.1
- OS: Microsoft Windows 10.0.22631
- Platform: Win32NT
- PSCompatibleVersions: {1.0, 2.0, 3.0, 4.0…}
- PSRemotingProtocolVersion: 2.3
- SerializationVersion: 1.1.0.1
- WSManStackVersion: 3.0
### Other information
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with New-MgDeviceManagementDeviceConfiguration and the Windows 10 custom configuration body shown in the issue, using SDK version 2.16.0. Trace how the cmdlet handles the @odata.type values for windows10CustomConfiguration and omaSetting. Done means the command creates and returns the device configuration instead of throwing "Cannot create an abstract class," with regression coverage for the reported body.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100