-
Notifications
You must be signed in to change notification settings - Fork 252
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
Missing Enumeration Members #2735
Comments
Thanks for raising this @jbh999 Any chance you can share a code sample of how you are deserializing the response as well as the SDK version you are using? I believe without a relevant converter like this one, Newtonsoft.Json will not support dowcasting out of the box. |
I am using Newtonsoft (as visible in the exception documented in Describe the bug section above). The code (deserializing JSON and casting to a ManagedDevice object) has been working for the past couple of years for all of our other enrolled device types. The basic code used to deserialize JSON and cast into a ManagedDevice object ...
The issue is that the SDK (any version) does not support the enumeration members in the API response |
I just noticed that these are listed in the documentation for the Beta MS Graph REST API Are there currently any plans to have the beta enumeration members promoted to v1.0 and incorporated into the code? |
Based on my experience: If you want to use the Graph API to do anything in case of device management, then switch to the beta endpoint. There is plenty of stuff that is simply not available or behaves differently in v1 on a HTTP level (so no blame for the SDK). Also if you look into the network tab when browsing https://intune.microsoft.com you'll see that they do everything at the beta endpoint. |
Describe the bug
Deserializing the JSON response from the getManagedDevice API endpoint (no issue here) and then casting it into a ManagedDevice object throws an exception.
The JSON response returned from the API includes:
Neither of these values have a member in the associated enumerations contained in the ManagedDevice class:
• ManagementAgentType enumeration does not have an
intuneAosp
member• DeviceEnrollmentType enumeration does not have an
androidAOSPUserOwnedDeviceEnrollment
memberCasting the deserialized response from the getManagedDevice API results in the following exception:
Expected behavior
Ability to deserialize the JSON response from getManagedDevice API endpoint and cast it into a ManagedDevice object
How to reproduce
Enroll a DigiLens (Set up Intune enrollment for Android (AOSP) corporate-owned user-associated devices)
Call the getManagedDevice API
Review the JSON (API returns success and a valid JSON response)
"managementAgent": "intuneAosp"
"deviceEnrollmentType": "androidAOSPUserOwnedDeviceEnrollment"
Deserializing the JSON response and casting it into a ManagedDevice object results in the exception
SDK Version
No response
Latest version known to work for scenario above?
Never worked
Known Workarounds
None that I know of
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: