microsoftgraph / msgraph-beta-sdk-java

Microsoft Graph Beta Java SDK
https://docs.microsoft.com/en-us/graph/sdks/use-beta?tabs=Java
MIT License
24 stars 8 forks source link

Missing Device attributes #996

Open cnotin opened 1 month ago

cnotin commented 1 month ago

Describe the bug

The Device class https://github.com/microsoftgraph/msgraph-beta-sdk-java/blob/main/src/main/java/com/microsoft/graph/beta/generated/models/Device.java has several attributes missing in this SDK (and certainly others) compared to what's returned by the API:

Here's the proof that they are returned by the API:

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#devices",
  "value": [
    {
      "id": "15b8b2c6-5056-412c-ad0f-4f06e0f140c2",
      "deletedDateTime": null,
[...}
      "createdDateTime": "2023-12-12T07:50:41Z",
[...]
      "externalSourceName": null,
[...]
      "sourceType": null,
[...]
    },

When using the PowerShell Graph SDK, they are available via AdditionalProperties These are also not documented.

I suppose this is because the metadata of the Graph API doesn't return those. So the issue is similar to https://github.com/microsoftgraph/msgraph-beta-sdk-java/issues/838 and https://github.com/microsoftgraph/msgraph-beta-sdk-java/issues/499

Device in metadata ``` ```

Expected behavior

Be able to get these Device attributes

How to reproduce

Use the Java (or other) Graph SDK and try accessing these properties of a Device

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

Call the API directly

Debug output

Click to expand log ``` ```

Configuration

No response

Other information

No response

Ndiritu commented 1 month ago

Thanks for raising this issue @cnotin.

While we resolve the issue with the API service team. You can also use getAdditionalData() to get key-value pairs for the missing properties.

Minor sidenote: getDeletedDateTime is available on the Device model via inheritance.

cnotin commented 1 month ago

Thank you! We'll monitor this then ;) And we noted the workaround.