microsoftgraph / microsoftgraph/msgraph-beta-sdk-java

Missing Device attributes

Abierto
#996 8 comentarios 4 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

dependency:metadata type:bug
Lenguaje dominante
Java
Estrellas
32
Forks
14
Merge medio
1 d 3 h
PR fusionados (30 d)
6

Descripción

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 https://github.com/microsoftgraph/msgraph-beta-sdk-java/issues/838 and https://github.com/microsoftgraph/msgraph-beta-sdk-java/issues/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_

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con src/main/java/com/microsoft/graph/beta/generated/models/Device.java y compara sus propiedades con la respuesta de la API y los metadatos beta enlazados en el issue. Consulta los issues relacionados #838 y #499 para conocer el enfoque establecido. Se considera terminado cuando el Java SDK expone los atributos de Device indicados y se puede acceder a ellos cuando la API los devuelve.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
java
Área
api
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.