diff --git a/config/graph_contracts.php b/config/graph_contracts.php index f913004..32d5684 100644 --- a/config/graph_contracts.php +++ b/config/graph_contracts.php @@ -319,7 +319,7 @@ ], 'mobileApp' => [ 'resource' => 'deviceAppManagement/mobileApps', - 'allowed_select' => ['id', 'displayName', 'publisher', 'description', '@odata.type', 'createdDateTime', 'lastModifiedDateTime'], + 'allowed_select' => ['id', 'displayName', 'publisher', 'description', '@odata.type', 'createdDateTime', 'lastModifiedDateTime', 'roleScopeTagIds'], 'allowed_expand' => [], 'type_family' => [ '#microsoft.graph.mobileApp', diff --git a/tests/Unit/GraphContractRegistryActualDataTest.php b/tests/Unit/GraphContractRegistryActualDataTest.php index 2f7abc6..e54daa7 100644 --- a/tests/Unit/GraphContractRegistryActualDataTest.php +++ b/tests/Unit/GraphContractRegistryActualDataTest.php @@ -106,6 +106,7 @@ $contract = $this->registry->get('mobileApp'); expect($contract)->not->toBeEmpty(); + expect($contract['allowed_select'] ?? [])->toContain('roleScopeTagIds'); expect($contract['assignments_list_path'] ?? null) ->toBe('/deviceAppManagement/mobileApps/{id}/assignments'); expect($contract['assignments_create_path'] ?? null) diff --git a/tests/Unit/PolicySnapshotServiceTest.php b/tests/Unit/PolicySnapshotServiceTest.php index 2f73057..9fa44ae 100644 --- a/tests/Unit/PolicySnapshotServiceTest.php +++ b/tests/Unit/PolicySnapshotServiceTest.php @@ -34,6 +34,7 @@ public function getPolicy(string $policyType, string $policyId, array $options = '@odata.type' => '#microsoft.graph.win32LobApp', 'createdDateTime' => '2025-01-01T00:00:00Z', 'lastModifiedDateTime' => '2025-01-02T00:00:00Z', + 'roleScopeTagIds' => ['0', 'tag-1', 'tag-2'], 'installCommandLine' => 'setup.exe /quiet', 'largeIcon' => ['type' => 'image/png', 'value' => '...'], ], @@ -155,7 +156,9 @@ public function request(string $method, string $path, array $options = []): Grap '@odata.type', 'createdDateTime', 'lastModifiedDateTime', + 'roleScopeTagIds', ]); + expect($result['payload']['roleScopeTagIds'])->toBe(['0', 'tag-1', 'tag-2']); expect($result['payload'])->not->toHaveKey('installCommandLine'); expect($result['payload'])->not->toHaveKey('largeIcon'); expect($client->requests[0][0])->toBe('getPolicy'); @@ -163,5 +166,6 @@ public function request(string $method, string $path, array $options = []): Grap expect($client->requests[0][2])->toBe('app-123'); expect($client->requests[0][3]['select'] ?? null)->toBeArray(); expect($client->requests[0][3]['select'])->toContain('displayName'); + expect($client->requests[0][3]['select'])->toContain('roleScopeTagIds'); expect($client->requests[0][3]['select'])->not->toContain('@odata.type'); });