Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MangedDevice serialize loses most of the data #692

Open
CmckeeverNova opened this issue Apr 17, 2024 · 9 comments
Open

MangedDevice serialize loses most of the data #692

CmckeeverNova opened this issue Apr 17, 2024 · 9 comments
Assignees

Comments

@CmckeeverNova
Copy link

CmckeeverNova commented Apr 17, 2024

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 {

@CmckeeverNova
Copy link
Author

From investigating it further it seems that the serialisation for ManagedDevice and AuditEvent in device managament isnt completed to include all the fields

@rkodev rkodev self-assigned this Apr 25, 2024
@rkodev
Copy link
Contributor

rkodev commented Apr 25, 2024

@CmckeeverNova would you mind sharing the version of the sdk you are using and some of the missing fields. In the meantime you should be able to access the fields in field 'device.GetAdditionalData()'

@CmckeeverNova
Copy link
Author

Im using v1.39.0

The only fields I get from any ManagedDevice are:
id, complianceState, deviceEnrollmentType, deviceRegistrationState, exchangeAccessState, exchangeAccessStateReason, managedDeviceName, managedDeviceOwnerType, managementAgent, partnerReportedThreatState.

Every other field is missing from the result of Serialize()

@rkodev
Copy link
Contributor

rkodev commented Apr 25, 2024

@CmckeeverNova Are you able to access the fields using device.GetAdditionalData()

@CmckeeverNova
Copy link
Author

@rkodev GetAdditionalData returns nothing back

@CmckeeverNova
Copy link
Author

Are there any updates to this or changes made recently?

@kwapik
Copy link

kwapik commented Jul 16, 2024

I just bumped into this issue in the newest version i.e. v.1.46.0. I hope it can be resolved soon.
For now, this is the only resource I found to have this error.

@rkodev
Copy link
Contributor

rkodev commented Jul 17, 2024

@kwapik could you Graph Explorer to execute the same get command and share the response you receive.

@rkodev rkodev assigned rkodev and unassigned rkodev Jul 17, 2024
@kwapik
Copy link

kwapik commented Aug 12, 2024

@rkodev sorry for the late reply, I just missed your comment.

Actually, I don't have any tenant with real data to test on. I did test this on a HTTP server which fakes EntraID API responses and I only had issues with Managed Devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants