microsoftgraph / microsoftgraph/msgraph-beta-sdk-dotnet
Unable to create an Intune corporate device identifier using the .NET Graph beta SDK
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 112
- Forks
- 37
- Avg merge
- 14h 57m
- Merged PRs (30d)
- 3
Description
Describe the bug
This code used to work to add a corporate device identifier to Intune via the Graph Beta SDK:
`
var request = new Microsoft.Graph.Beta.Models.ImportedDeviceIdentity
{
ImportedDeviceIdentifier = details.Manufacturer + "," + details.Model + "," + details.SerialNumber,
ImportedDeviceIdentityType = ImportedDeviceIdentityType.ManufacturerModelSerial,
Platform = Microsoft.Graph.Beta.Models.Platform.Windows
};
Microsoft.Graph.Beta.Models.ImportedDeviceIdentity? result = await clientBeta.DeviceManagement.ImportedDeviceIdentities.PostAsync(request);
`
But this now fails with an error 500. The equivalent Graph Explorer request is different now, so there's nothing matching in the SDK:
Expected behavior
There should be a method in the beta SDK to add a corporate device identifier via https://graph.microsoft.com/beta/deviceManagement/importedDeviceIdentities/microsoft.graph.importDeviceIdentityList.
How to reproduce
See above.
SDK Version
5.99
Latest version known to work for scenario above?
No response
Known Workarounds
SendPrimitiveAsync works to craft a custom POST request.
Debug output
No response
Configuration
No response
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 comparing the existing ImportedDeviceIdentities.PostAsync request with the beta endpoint /deviceManagement/importedDeviceIdentities/microsoft.graph.importDeviceIdentityList and the Graph Explorer request shown in the issue. Review the SDK's generated request patterns and the SendPrimitiveAsync workaround; done means the beta SDK exposes the operation and can create a corporate device identifier without a custom request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100