From 2c3ba6c57d2500c0ee62a750f7b32065c4ad9e54 Mon Sep 17 00:00:00 2001 From: Egor Sidorenko Date: Wed, 26 Aug 2026 15:10:45 +0500 Subject: [PATCH] Add FilterRestrictions annotation to managedDevice The entity description says filtering is only supported on a subset of properties, but there was no FilterRestrictions annotation, so the metadata advertised the whole collection as filterable. Lists the 35 properties that are not filterable in either v1.0 or beta. The two that are filterable in beta only, deviceType and ownerType, are left out so the same annotation stays correct for both versions. --- transforms/csdl/preprocess_csdl.xsl | 69 +++++++++++++++++++ .../csdl/preprocess_csdl_test_input.xml | 3 + .../csdl/preprocess_csdl_test_output.xml | 47 +++++++++++++ 3 files changed, 119 insertions(+) diff --git a/transforms/csdl/preprocess_csdl.xsl b/transforms/csdl/preprocess_csdl.xsl index d44fe2c93..88ca4776c 100644 --- a/transforms/csdl/preprocess_csdl.xsl +++ b/transforms/csdl/preprocess_csdl.xsl @@ -1400,6 +1400,57 @@ + + + Org.OData.Capabilities.V1.FilterRestrictions + + + Filterable + true + + + NonFilterableProperties + + activationLockBypassCode + androidSecurityPatchLevel + azureADRegistered + configurationManagerClientEnabledFeatures + deviceActionResults + deviceEnrollmentType + deviceHealthAttestationState + deviceRegistrationState + easActivated + easActivationDateTime + easDeviceId + enrollmentProfileName + ethernetMacAddress + exchangeAccessStateReason + exchangeLastSuccessfulSyncDateTime + freeStorageSpaceInBytes + iccid + isEncrypted + isSupervised + managedDeviceName + managedDeviceOwnerType + managementCertificateExpirationDate + meid + notes + partnerReportedThreatState + physicalMemoryInBytes + remoteAssistanceSessionErrorDetails + remoteAssistanceSessionUrl + requireUserEnrollmentApproval + subscriberCarrier + totalStorageSpaceInBytes + udid + userDisplayName + userId + wiFiMacAddress + + + + + Org.OData.Capabilities.V1.ExpandRestrictions @@ -1792,6 +1843,16 @@ + + + + + microsoft.graph.managedDevice + + + + + @@ -2185,6 +2246,14 @@ + + + + + + + + + + diff --git a/transforms/csdl/preprocess_csdl_test_output.xml b/transforms/csdl/preprocess_csdl_test_output.xml index 1a0265333..f55f7f55f 100644 --- a/transforms/csdl/preprocess_csdl_test_output.xml +++ b/transforms/csdl/preprocess_csdl_test_output.xml @@ -934,6 +934,53 @@ + + + + + + + + activationLockBypassCode + androidSecurityPatchLevel + azureADRegistered + configurationManagerClientEnabledFeatures + deviceActionResults + deviceEnrollmentType + deviceHealthAttestationState + deviceRegistrationState + easActivated + easActivationDateTime + easDeviceId + enrollmentProfileName + ethernetMacAddress + exchangeAccessStateReason + exchangeLastSuccessfulSyncDateTime + freeStorageSpaceInBytes + iccid + isEncrypted + isSupervised + managedDeviceName + managedDeviceOwnerType + managementCertificateExpirationDate + meid + notes + partnerReportedThreatState + physicalMemoryInBytes + remoteAssistanceSessionErrorDetails + remoteAssistanceSessionUrl + requireUserEnrollmentApproval + subscriberCarrier + totalStorageSpaceInBytes + udid + userDisplayName + userId + wiFiMacAddress + + + + +