Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Missing Device attributes #996

Copy link
Copy link
@cnotin

Description

@cnotin
Issue body actions

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:

  • createdDateTime
  • deletedDateTime (available, actually)
  • externalSourceName
  • sourceType

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 #838 and #499

Device in metadata
<EntityType Name="device" BaseType="graph.directoryObject" OpenType="true">
<Property Name="accountEnabled" Type="Edm.Boolean"/>
<Property Name="alternativeSecurityIds" Type="Collection(graph.alternativeSecurityId)" Nullable="false"/>
<Property Name="approximateLastSignInDateTime" Type="Edm.DateTimeOffset"/>
<Property Name="complianceExpirationDateTime" Type="Edm.DateTimeOffset"/>
<Property Name="deviceCategory" Type="Edm.String"/>
<Property Name="deviceId" Type="Edm.String"/>
<Property Name="deviceMetadata" Type="Edm.String"/>
<Property Name="deviceOwnership" Type="Edm.String"/>
<Property Name="deviceVersion" Type="Edm.Int32"/>
<Property Name="displayName" Type="Edm.String"/>
<Property Name="domainName" Type="Edm.String"/>
<Property Name="enrollmentProfileName" Type="Edm.String"/>
<Property Name="enrollmentType" Type="Edm.String"/>
<Property Name="extensionAttributes" Type="graph.onPremisesExtensionAttributes"/>
<Property Name="hostnames" Type="Collection(Edm.String)"/>
<Property Name="isCompliant" Type="Edm.Boolean"/>
<Property Name="isManaged" Type="Edm.Boolean"/>
<Property Name="isManagementRestricted" Type="Edm.Boolean"/>
<Property Name="isRooted" Type="Edm.Boolean"/>
<Property Name="managementType" Type="Edm.String"/>
<Property Name="manufacturer" Type="Edm.String"/>
<Property Name="mdmAppId" Type="Edm.String"/>
<Property Name="model" Type="Edm.String"/>
<Property Name="onPremisesLastSyncDateTime" Type="Edm.DateTimeOffset"/>
<Property Name="onPremisesSecurityIdentifier" Type="Edm.String"/>
<Property Name="onPremisesSyncEnabled" Type="Edm.Boolean"/>
<Property Name="operatingSystem" Type="Edm.String"/>
<Property Name="operatingSystemVersion" Type="Edm.String"/>
<Property Name="physicalIds" Type="Collection(Edm.String)" Nullable="false"/>
<Property Name="profileType" Type="Edm.String"/>
<Property Name="registrationDateTime" Type="Edm.DateTimeOffset"/>
<Property Name="systemLabels" Type="Collection(Edm.String)" Nullable="false"/>
<Property Name="trustType" Type="Edm.String"/>
<Property Name="kind" Type="Edm.String"/>
<Property Name="name" Type="Edm.String"/>
<Property Name="platform" Type="Edm.String"/>
<Property Name="status" Type="Edm.String"/>
<NavigationProperty Name="usageRights" Type="Collection(graph.usageRight)" ContainsTarget="true"/>
<NavigationProperty Name="memberOf" Type="Collection(graph.directoryObject)"/>
<NavigationProperty Name="registeredOwners" Type="Collection(graph.directoryObject)"/>
<NavigationProperty Name="registeredUsers" Type="Collection(graph.directoryObject)"/>
<NavigationProperty Name="transitiveMemberOf" Type="Collection(graph.directoryObject)"/>
<NavigationProperty Name="extensions" Type="Collection(graph.extension)" ContainsTarget="true"/>
<NavigationProperty Name="commands" Type="Collection(graph.command)" ContainsTarget="true"/>
<Annotation Term="Org.OData.Core.V1.AlternateKeys">
<Collection>
<Record Type="Org.OData.Core.V1.AlternateKey">
<PropertyValue Property="Key">
<Collection>
<Record Type="Org.OData.Core.V1.PropertyRef">
<PropertyValue Property="Alias" String="deviceId"/>
<PropertyValue Property="Name" PropertyPath="deviceId"/>
</Record>
</Collection>
</PropertyValue>
</Record>
</Collection>
</Annotation>
</EntityType>

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 ```
</details>


### Configuration

_No response_

### Other information

_No response_
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency:metadataAwaiting fix from core dependency project moduleAwaiting fix from core dependency project moduletype:bugA broken experienceA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.