Universal Print Share & Assignment - Intune Device Configuration Policy Profile Assignments - Update will not work

Harold Junca III 25 Reputation points
2023-07-25T19:47:41.71+00:00

We built an api call to create universal printer shares & access policies.

We built api calls to create Intune device configuration policy profiles, including configuration settings (sourced from csv), via POST https://graph.microsoft.com/beta/deviceManagement/configurationPolicies

We are trying build api calls to update multiple device configuration profiles assignments to assign to AAD security groups, fed via a csv, but cannot seem to get this to work.

We are trying build api calls to update multiple device configuration profiles assignments to assign to AAD security groups, fed via a csv, but cannot seem to get this to work.

{
  "@odata.type": "#microsoft.graph.deviceManagementConfigurationPolicyAssignment",
  "target": {
    "@odata.type": "#microsoft.graph.groupAssignmentTarget",
    "deviceAndAppManagementAssignmentFilterId": null,
    "deviceAndAppManagementAssignmentFilterType": "none",
    "groupId": "{AAD Group ObjectID}"
  },
  "source": "direct",
  "sourceId": "{deviceManagementConfigurationPolicyId}"
}
{
    "error": {
        "code": "No method match route template",
        "message": "No OData route exists that match template ~/singleton/navigation/key/navigation with http verb PATCH for request /DeviceConfigV2/DCV2GraphService/de147310-ffff-2733-0611-xxxxxxxxxx/deviceManagement/configurationPolicies('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx')/assignments.",
        "innerError": {
            "date": "2023-07-25T19:42:27",
            "request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
            "client-request-id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
        }
    }
}

Any help with this would be appreciated.

Microsoft Security Intune Configuration
Microsoft Security Microsoft Graph
0 comments No comments
{count} vote

Accepted answer
  1. Lu Dai-MSFT 28,496 Reputation points
    2023-07-26T02:31:44.7633333+00:00

    @Harold Junca III Thanks for posting in our Q&A.

    For this issue, I have done the test in my lab. I will share your some information.

    The request URL:

    Post https://graph.microsoft.com/beta/deviceManagement/configurationPolicies{deviceConfigurationId}/assign
    

    The request Body:

    {
        "assignments": [
            {
                "target": {
                    "@odata.type": "#microsoft.graph.groupAssignmentTarget",
                    "groupId": "xxxxxxxx"
                }
            }
        ]
    }
    

    It works well. Here is my test result:

    User's image

    User's image

    User's image

    Hope it will give you some ideas.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.