msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

No method match route template while trying to assign group to CompliancePolicy

Open PieterVerlooij opened this issue 5 months ago • 7 comments

Describe the bug

Hi!

I am trying to assign a device group to a compliance policy via the Graph SDK. Either by

  • New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment
  • New-MgDeviceManagementDeviceCompliancePolicyAssignment
  • Invoke-GraphRequest -Method post -Uri "https://graph.microsoft.com/v1.0//deviceManagement/deviceCompliancePolicies/$newCompliancePolicyId/assignments" -Body $1

But all results in;

Image or Image

Expected behavior

I expect the group to be assigned to said compliance policy.

How to reproduce

  1. Create hash table with the group details for example" $assignmentParams = @{ '@odata.type' = '#microsoft.graph.deviceCompliancePolicyAssignment' target = @{ '@odata.type' = 'microsoft.graph.configurationManagerCollectionAssignmentTarget' collectionId = '22e09846-0b37-4b7b-adcc-8dd1d837515f_2de4a377-c833-4320-9957-64d2c567d7bb' } }
  2. Run Invoke-GraphRequest -Method post -Uri "https://graph.microsoft.com/v1.0//deviceManagement/deviceCompliancePolicies/11473e08-4211-4bd4-898f-d17052219531/assignments" or New-MgDeviceManagementDeviceCompliancePolicyAssignment -DeviceCompliancePolicyId '11473e08-4211-4bd4-898f-d17052219531' -BodyParameter $assignmentParams
  3. See results

SDK Version

2.29.1

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Windows 11 x64

### Other information

_No response_

PieterVerlooij avatar Aug 13 '25 11:08 PieterVerlooij

@PieterVerlooij can you please provide us with the text output when running these cmdlets with the -Debug parameter (not a screenshot please) that will allow us to engage the team that owns the underlying API that is throwing these errors

gavinbarron avatar Nov 10 '25 21:11 gavinbarron

Hi,

Sorry for the late reply. I am running the following commands:

$1 = Get-MgDeviceManagementDeviceCompliancePolicy
$2 = $1[0]
$assignmentParams = @{
    '@odata.type' = '#microsoft.graph.deviceCompliancePolicyAssignment'
    target        = @{
        '@odata.type' = 'microsoft.graph.configurationManagerCollectionAssignmentTarget'
        collectionId  = '6991080e-e60c-4049-9cc5-ed50daedad7f_2de4a377-c833-4320-9957-64d2c567d7bb'
    }
}
New-MgDeviceManagementDeviceCompliancePolicyAssignment -DeviceCompliancePolicyId $2.Id -BodyParameter $assignmentParams -Verbose -Debug

And the output:

New-MgDeviceManagementDeviceCompliancePolicyAssignment -DeviceCompliancePolicyId $2.Id -BodyParameter $assignmentParams -Verbose -Debug

DEBUG: [CmdletBeginProcessing]: - New-MgDeviceManagementDeviceCompliancePolicyAssignment begin processing with parameterSet 'Create'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientSecret', ContextScope: 'Process', AppName: 'pda-intune-iac-testing'.
DEBUG: [Authentication]: - Scopes: [DeviceTemplate.Create, Device.ReadWrite.All, DeviceTemplate.ReadWrite.All, Group.Create, Group.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All, DeviceManagementScripts.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All, Policy.ReadWrite.DeviceConfiguration, DeviceManagementConfiguration.ReadWrite.All].

Confirm
Are you sure you want to perform this action?
Performing the operation "New-MgDeviceManagementDeviceCompliancePolicyAssignment_Create" on target "Call remote 'POST 
/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy-id}/assignments' operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://graph.microsoft.com/v1.0/deviceManagement/deviceCompliancePolicies/32dd0792-4c95-44a7-97d3-f872297c8ffb/assignments

Headers:
FeatureFlag                   : 00000003
Cache-Control                 : no-store, no-cache
User-Agent                    : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-NL),PowerShell/2025.4.0
SdkVersion                    : graph-powershell/2.32.0
client-request-id             : 279252ac-8783-4624-9124-bcb9850b8229
Accept-Encoding               : gzip,deflate,br

Body:
{
  "@odata.type": "#microsoft.graph.deviceCompliancePolicyAssignment",
  "target": {
    "collectionId": "6991080e-e60c-4049-9cc5-ed50daedad7f_2de4a377-c833-4320-9957-64d2c567d7bb",
    "@odata.type": "microsoft.graph.configurationManagerCollectionAssignmentTarget"
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 0d831aca-2fc2-45d3-a3ff-6218849430a3
client-request-id             : 279252ac-8783-4624-9124-bcb9850b8229
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"DU2PEPF000105E9"}}
Date                          : Mon, 17 Nov 2025 10:03:21 GMT

Body:
{
  "error": {
    "code": "No method match route template",
    "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('32dd0792-4c95-44a7-97d3-f872297c8ffb')/assignments.",
    "innerError": {
      "date": "2025-11-17T10:03:22",
      "request-id": "0d831aca-2fc2-45d3-a3ff-6218849430a3",
      "client-request-id": "279252ac-8783-4624-9124-bcb9850b8229"
    }
  }
}


New-MgDeviceManagementDeviceCompliancePolicyAssignment_Create: No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('32dd0792-4c95-44a7-97d3-f872297c8ffb')/assignments.       

Status: 400 (BadRequest)
ErrorCode: No method match route template
Date: 2025-11-17T10:03:22

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 0d831aca-2fc2-45d3-a3ff-6218849430a3
client-request-id             : 279252ac-8783-4624-9124-bcb9850b8229
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"002","RoleInstance":"DU2PEPF000105E9"}}
Date                          : Mon, 17 Nov 2025 10:03:21 GMT


  Recommendation: See service error codes: https://learn.microsoft.com/graph/errors

PieterVerlooij avatar Nov 17 '25 10:11 PieterVerlooij

Same goes for the Beta version:

$1 = Get-MgBetaDeviceManagementDeviceCompliancePolicy                       in pwsh at 11:07:59
$2 = $1[3]
$assignmentParams = @{
    '@odata.type' = '#microsoft.graph.deviceCompliancePolicyAssignment'
    target        = @{
        '@odata.type' = 'microsoft.graph.configurationManagerCollectionAssignmentTarget'
        collectionId  = '6991080e-e60c-4049-9cc5-ed50daedad7f_2de4a377-c833-4320-9957-64d2c567d7bb'
    }
}
New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -DeviceCompliancePolicyId $2.Id -BodyParameter $assignmentParams -Verbose -Debug

DEBUG: [CmdletBeginProcessing]: - New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment begin processing with parameterSet 'Create'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientSecret', ContextScope: 'Process', AppName: 'pda-intune-iac-testing'.
DEBUG: [Authentication]: - Scopes: [DeviceTemplate.Create, Device.ReadWrite.All, DeviceTemplate.ReadWrite.All, Group.Create, Group.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All, DeviceManagementScripts.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All, Policy.ReadWrite.DeviceConfiguration, DeviceManagementConfiguration.ReadWrite.All].

Confirm
Are you sure you want to perform this action?
Performing the operation "New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment_Create" on target "Call remote 'POST
/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy-id}/assignments' operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://graph.microsoft.com/beta/deviceManagement/deviceCompliancePolicies/7cd0c66a-745a-4696-ad23-bf63d191900a/assignments

Headers:
FeatureFlag                   : 00000003
Cache-Control                 : no-store, no-cache
User-Agent                    : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-NL),PowerShell/2025.4.0
SdkVersion                    : graph-powershell-beta/2.32.0
client-request-id             : 6441c3ba-6d51-4467-9b8a-ed10879218ed
Accept-Encoding               : gzip,deflate,br

Body:
{
  "@odata.type": "#microsoft.graph.deviceCompliancePolicyAssignment",
  "target": {
    "collectionId": "6991080e-e60c-4049-9cc5-ed50daedad7f_2de4a377-c833-4320-9957-64d2c567d7bb",
    "@odata.type": "microsoft.graph.configurationManagerCollectionAssignmentTarget"
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 8fe91ffe-e46d-4d26-a694-8a6e88fee3d3
client-request-id             : 6441c3ba-6d51-4467-9b8a-ed10879218ed
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"010","RoleInstance":"DB1PEPF00045AF6"}}
Date                          : Mon, 17 Nov 2025 10:08:01 GMT

Body:
{
  "error": {
    "code": "No method match route template",
    "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('7cd0c66a-745a-4696-ad23-bf63d191900a')/assignments.",
    "innerError": {
      "date": "2025-11-17T10:08:01",
      "request-id": "8fe91ffe-e46d-4d26-a694-8a6e88fee3d3",
      "client-request-id": "6441c3ba-6d51-4467-9b8a-ed10879218ed"
    }
  }
}


New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment_Create: 
Line |
  10 |  New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment -DeviceCom …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('7cd0c66a-745a-4696-ad23-bf63d191900a')/assignments.

Status: 400 (BadRequest)
ErrorCode: No method match route template
Date: 2025-11-17T10:08:01

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 8fe91ffe-e46d-4d26-a694-8a6e88fee3d3
client-request-id             : 6441c3ba-6d51-4467-9b8a-ed10879218ed
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"010","RoleInstance":"DB1PEPF00045AF6"}}
Date                          : Mon, 17 Nov 2025 10:08:01 GMT


  Recommendation: See service error codes: https://learn.microsoft.com/graph/errors

PieterVerlooij avatar Nov 17 '25 10:11 PieterVerlooij

As for the v1.0 version:

DEBUG: [CmdletBeginProcessing]: - New-MgDeviceManagementDeviceCompliancePolicyAssignment begin processing with parameterSet 'Create'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientSecret', ContextScope: 'Process', AppName: 'pda-intune-iac-testing'.
DEBUG: [Authentication]: - Scopes: [DeviceTemplate.Create, Device.ReadWrite.All, DeviceTemplate.ReadWrite.All, Group.Create, Group.ReadWrite.All, DeviceManagementServiceConfig.ReadWrite.All, DeviceManagementScripts.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All, Policy.ReadWrite.DeviceConfiguration, DeviceManagementConfiguration.ReadWrite.All].

Confirm
Are you sure you want to perform this action?
Performing the operation "New-MgDeviceManagementDeviceCompliancePolicyAssignment_Create" on target "Call remote 'POST
/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicy-id}/assignments' operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://graph.microsoft.com/v1.0/deviceManagement/deviceCompliancePolicies/7cd0c66a-745a-4696-ad23-bf63d191900a/assignments

Headers:
FeatureFlag                   : 00000003
Cache-Control                 : no-store, no-cache
User-Agent                    : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-NL),PowerShell/2025.4.0
SdkVersion                    : graph-powershell/2.32.0
client-request-id             : 244baa85-93e2-4919-a923-1e484539a2d3
Accept-Encoding               : gzip,deflate,br

Body:
{
  "@odata.type": "#microsoft.graph.deviceCompliancePolicyAssignment",
  "target": {
    "collectionId": "6991080e-e60c-4049-9cc5-ed50daedad7f_2de4a377-c833-4320-9957-64d2c567d7bb",
    "@odata.type": "microsoft.graph.configurationManagerCollectionAssignmentTarget"
  }
}


DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : a09a960d-ddff-4c24-a838-f717c300e484
client-request-id             : 244baa85-93e2-4919-a923-1e484539a2d3
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"011","RoleInstance":"DB1PEPF00077F3F"}}
Date                          : Mon, 17 Nov 2025 10:09:58 GMT

Body:
{
  "error": {
    "code": "No method match route template",
    "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('7cd0c66a-745a-4696-ad23-bf63d191900a')/assignments.",
    "innerError": {
      "date": "2025-11-17T10:09:59",
      "request-id": "a09a960d-ddff-4c24-a838-f717c300e484",
      "client-request-id": "244baa85-93e2-4919-a923-1e484539a2d3"
    }
  }
}


New-MgDeviceManagementDeviceCompliancePolicyAssignment_Create: 
Line |
  28 |  New-MgDeviceManagementDeviceCompliancePolicyAssignment -DeviceComplia …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('7cd0c66a-745a-4696-ad23-bf63d191900a')/assignments.

Status: 400 (BadRequest)
ErrorCode: No method match route template
Date: 2025-11-17T10:09:59

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : a09a960d-ddff-4c24-a838-f717c300e484
client-request-id             : 244baa85-93e2-4919-a923-1e484539a2d3
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"011","RoleInstance":"DB1PEPF00077F3F"}}
Date                          : Mon, 17 Nov 2025 10:09:58 GMT


  Recommendation: See service error codes: https://learn.microsoft.com/graph/errors

PieterVerlooij avatar Nov 17 '25 10:11 PieterVerlooij

Same goes for New-MgBetaDeviceManagementDeviceConfigurationAssignment

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: POST

Absolute Uri: https://graph.microsoft.com/beta/deviceManagement/configurationPolicies/af5e4162-eb12-4c52-ba90-595d231d6579/assignments

Headers: FeatureFlag : 00000003 Cache-Control : no-store, no-cache User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-NL),PowerShell/2025.4.0 SdkVersion : graph-powershell-beta/2.32.0 client-request-id : 82916a56-a791-4c7d-8791-1bba827f124d Accept-Encoding : gzip,deflate,br

Body: { "target": { "@odata.type": "#microsoft.graph.groupAssignmentTarget", "groupId": "8b89ddae-549b-484f-b3ef-012499483954" } }

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: BadRequest

Headers: Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : 2bfe23ef-0aff-4583-93e7-37f24755832e client-request-id : 82916a56-a791-4c7d-8791-1bba827f124d x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"DU2PEPF00050AEA"}} Date : Tue, 02 Dec 2025 15:17:23 GMT

Body: { "error": { "code": "No method match route template", "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfigV2/DCV2GraphService/de147310-ffff-7717-0606-120120184893/deviceManagement/configurationPolicies('af5e4162-eb12-4c52-ba90-595d231d6579')/assignments.", "innerError": { "date": "2025-12-02T15:17:23", "request-id": "2bfe23ef-0aff-4583-93e7-37f24755832e", "client-request-id": "82916a56-a791-4c7d-8791-1bba827f124d" } } }

PieterVerlooij avatar Dec 02 '25 15:12 PieterVerlooij

And same goes for New-MgBetaDeviceManagementDeviceCompliancePolicyAssignment DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: POST

Absolute Uri: https://graph.microsoft.com/beta/deviceManagement/deviceCompliancePolicies/7eff9a97-f74a-45d8-b90a-fb645ac34fd9/assignments

Headers: FeatureFlag : 00000003 Cache-Control : no-store, no-cache User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-NL),PowerShell/2025.4.0 SdkVersion : graph-powershell-beta/2.32.0 client-request-id : 9bd5f0fe-12cf-4d16-adb7-f549982fa229 Accept-Encoding : gzip,deflate,br

Body: { "target": { "@odata.type": "#microsoft.graph.groupAssignmentTarget", "groupId": "8b89ddae-549b-484f-b3ef-012499483954" } }

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: BadRequest

Headers: Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : 72f691b2-6ec6-41db-b70b-7d50c282ec2a client-request-id : 9bd5f0fe-12cf-4d16-adb7-f549982fa229 x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"DB1PEPF0009620D"}} Date : Thu, 11 Dec 2025 09:45:56 GMT

Body: { "error": { "code": "No method match route template", "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('7eff9a97-f74a-45d8-b90a-fb645ac34fd9')/assignments.", "innerError": { "date": "2025-12-11T09:45:57", "request-id": "72f691b2-6ec6-41db-b70b-7d50c282ec2a", "client-request-id": "9bd5f0fe-12cf-4d16-adb7-f549982fa229" } } }

PieterVerlooij avatar Dec 11 '25 09:12 PieterVerlooij

Same goes for v1.0 New-MgDeviceManagementDeviceCompliancePolicyAssignment EBUG: ============================ HTTP REQUEST ============================

HTTP Method: POST

Absolute Uri: https://graph.microsoft.com/v1.0/deviceManagement/deviceCompliancePolicies/7eff9a97-f74a-45d8-b90a-fb645ac34fd9/assignments

Headers: FeatureFlag : 00000003 Cache-Control : no-store, no-cache User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26200; en-NL),PowerShell/2025.4.0 SdkVersion : graph-powershell/2.32.0 client-request-id : e964f9f6-a1f8-4c8e-b195-1918567b924a Accept-Encoding : gzip,deflate,br

Body: { "target": { "@odata.type": "#microsoft.graph.groupAssignmentTarget", "groupId": "8b89ddae-549b-484f-b3ef-012499483954" } }

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: BadRequest

Headers: Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : dddc86a8-c882-49d0-9bbf-bdfaa78aa4f9 client-request-id : e964f9f6-a1f8-4c8e-b195-1918567b924a x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"DB1PEPF0001F9DA"}} Date : Thu, 11 Dec 2025 09:47:45 GMT

Body: { "error": { "code": "No method match route template", "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb POST for request /DeviceConfiguration_2511/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies('7eff9a97-f74a-45d8-b90a-fb645ac34fd9')/assignments.", "innerError": { "date": "2025-12-11T09:47:46", "request-id": "dddc86a8-c882-49d0-9bbf-bdfaa78aa4f9", "client-request-id": "e964f9f6-a1f8-4c8e-b195-1918567b924a" } } }

PieterVerlooij avatar Dec 11 '25 09:12 PieterVerlooij

Oh, @PieterVerlooij, it looks like the inputs may be causing this issue

Here's the documentation for the REST API https://learn.microsoft.com/en-us/graph/api/intune-deviceconfig-devicecompliancepolicyassignment-create?view=graph-rest-1.0

This has an object that looks a bit different from what you supplied:

As documented:

{
  "@odata.type": "#microsoft.graph.deviceCompliancePolicyAssignment",
  "target": {
    "@odata.type": "microsoft.graph.scopeTagGroupAssignmentTarget",
    "targetType": "user",
    "entraObjectId": "Entra Object Id value"
  }
}

As you supplied:

{
  "target": {
    "@odata.type": "#microsoft.graph.groupAssignmentTarget",
    "groupId": "8b89ddae-549b-484f-b3ef-012499483954"
  }
}

I'm no InTune expert at all if you're still getting issues we'll attempt to escalate to the team that owns the API

gavinbarron avatar Dec 18 '25 03:12 gavinbarron

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.