VERBOSE: GET https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations with 0-byte payload
DEBUG: GET /beta/deviceManagement/deviceConfigurations HTTP/1.1
HTTP: graph.microsoft.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.22631; en-GB) PowerShell/5.1.22621.4111 Invoke-MgGraphRequest
VERBOSE: received 393337-byte response of content type application/json
DEBUG: GET https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
request-id: ee554cd3-3516-4e1a-a039-e4a62b3b2791
client-request-id: 65043a5f-6d0c-4680-9ba5-94c4e35655f4
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"LN2PEPF000114DC"}}
OData-Version: 4.0
Date: Tue, 08 Oct 2024 16:02:10 GMT
Content-Encoding: gzip
Content-Type: application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8
Describe the bug
I'm trying to get all the device configuration profiles from Intune. I've tried both of these with Microsoft.Graph and Microsoft.Beta:
The first returns 54 items then second 80. However, there are in fact 91Device Configuration policies.
Expected behavior
Expected either 1 or 2:
Neither of these happened.
How to reproduce
SDK Version
2.23.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
VERBOSE: GET https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations with 0-byte payload DEBUG: GET /beta/deviceManagement/deviceConfigurations HTTP/1.1 HTTP: graph.microsoft.com User-Agent: Mozilla/5.0 (Windows NT 10.0; Microsoft Windows 10.0.22631; en-GB) PowerShell/5.1.22621.4111 Invoke-MgGraphRequest
VERBOSE: received 393337-byte response of content type application/json DEBUG: GET https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations HTTP/1.1 200 OK Transfer-Encoding: chunked Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 request-id: ee554cd3-3516-4e1a-a039-e4a62b3b2791 client-request-id: 65043a5f-6d0c-4680-9ba5-94c4e35655f4 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"UK South","Slice":"E","Ring":"5","ScaleUnit":"001","RoleInstance":"LN2PEPF000114DC"}} OData-Version: 4.0 Date: Tue, 08 Oct 2024 16:02:10 GMT Content-Encoding: gzip Content-Type: application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8
{"@odata.context":"https://graph.microsoft.com/beta/$metadata#deviceManagement/deviceConfigurations","value":[{"@odata.type":"#microsoft.graph.iosCustomConfiguration","id":"d3a0db21-d423-4ae4-a5ac-ec17d4284687", "lastModifiedDateTime":"2022-06-08T09:55:44.7654192Z","roleScopeTagIds": REDACTED}]}
Configuration
-OS: Windows 11 -Architecture x64 Name Value
PSVersion 5.1.22621.4111
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.4111
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Other information
If one: $response= Get-MgDeviceManagementDeviceConfiguration -All $response.Count returns 54
This is the same count for: $response = Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/deviceManagement/deviceConfigurations"