microsoftgraph / microsoftgraph/msgraph-sdk-go
MangedDevice serialize loses most of the data
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 335
- Forks
- 43
- Avg merge
- 15h 19m
- Merged PRs (30d)
- 3
Description
When I get the list of maganed devices using the sdk i can see all the info there and once I serialize it using the built in function it loses most of the data, seemingly cutting off everytime at:
"partnerReportedThreatState":"unknown"
This is how it is being serialized:
case *models.ManagedDevice:
err = graphModel.Serialize(writer)
if err != nil {
return
}
Using:
result, err := client.DeviceManagement().ManagedDevices().Get(ctx.Context, nil)
and doing a page iterator for each device:
pageIterator, err := msgraphcore.NewPageIterator[*models.ManagedDevice](result, client.GetAdapter(), models.CreateManagedDeviceCollectionResponseFromDiscriminatorValue)
if err != nil {
return
}
err = pageIterator.Iterate(ctx.Context, func(device *models.ManagedDevice) bool {
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 with the ManagedDevice serialization path and the provided DeviceManagement().ManagedDevices().Get call, then reproduce the issue through the msgraphcore page iterator. Compare the device data before and after Serialize; done means serialization retains the fields currently lost after partnerReportedThreatState.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100