fix: allow compliance scheduled action expand

This commit is contained in:
Ahmed Darrazi 2025-12-28 23:51:07 +01:00
parent 18cf22a7ed
commit 02dc55b5d4
2 changed files with 22 additions and 6 deletions

View File

@ -15,10 +15,7 @@
'deviceConfiguration' => [
'resource' => 'deviceManagement/deviceConfigurations',
'allowed_select' => ['id', 'displayName', 'description', '@odata.type', 'version', 'lastModifiedDateTime'],
'allowed_expand' => [
'scheduledActionsForRule',
'scheduledActionsForRule($expand=scheduledActionConfigurations)',
],
'allowed_expand' => [],
'type_family' => [
'#microsoft.graph.deviceConfiguration',
'#microsoft.graph.windows10CustomConfiguration',
@ -139,7 +136,10 @@
'deviceCompliancePolicy' => [
'resource' => 'deviceManagement/deviceCompliancePolicies',
'allowed_select' => ['id', 'displayName', 'description', '@odata.type', 'version', 'lastModifiedDateTime'],
'allowed_expand' => [],
'allowed_expand' => [
'scheduledActionsForRule',
'scheduledActionsForRule($expand=scheduledActionConfigurations)',
],
'type_family' => [
'#microsoft.graph.deviceCompliancePolicy',
'#microsoft.graph.windows10CompliancePolicy',
@ -331,7 +331,7 @@
],
'assignmentFilter' => [
'resource' => 'deviceManagement/assignmentFilters',
'allowed_select' => ['id', 'displayName', 'description', 'platform', 'rule', 'roleScopeTagIds'],
'allowed_select' => ['id', 'displayName', 'description', 'platform', 'rule'],
'allowed_expand' => [],
'type_family' => [
'#microsoft.graph.deviceAndAppManagementAssignmentFilter',

View File

@ -93,3 +93,19 @@
expect($sanitized)->not->toHaveKey('hardwareHashExtractionEnabled');
expect($sanitized)->not->toHaveKey('locale');
});
it('exposes compliance policy expand for scheduled actions', function () {
$contract = $this->registry->get('deviceCompliancePolicy');
expect($contract)->not->toBeEmpty();
expect($contract['allowed_expand'] ?? [])
->toContain('scheduledActionsForRule($expand=scheduledActionConfigurations)');
});
it('omits role scope tags from assignment filter selects', function () {
$contract = $this->registry->get('assignmentFilter');
expect($contract)->not->toBeEmpty();
expect($contract['allowed_select'] ?? [])
->not->toContain('roleScopeTagIds');
});