Microsoft-graph-docs: Intune Create #Device#CompliancePolicy

Created on 13 Dec 2017  路  7Comments  路  Source: microsoftgraph/microsoft-graph-docs

Issue:
When trying to create Device compliance policies through Graph, i just get an error.
This worked fine a month ago, but when reusing my code now nothing works and just comes back with the following error:

{
"error": {
"code": "InternalError",
"message": "An internal server error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 83cf2637-fd85-48da-a7bf-3fd1797d3c93 - Url: https://fef.amsub0102.manage.microsoft.com/StatelessDeviceConfigurationFEService/deviceManagement/deviceCompliancePolicies?api-version=5017-09-19 - CustomApiErrorPhrase: ",
"innerError": {
"request-id": "83cf2637-fd85-48da-a7bf-3fd1797d3c93",
"date": "2017-12-13T10:21:26"
}
}
}

I have also tried through graph explorer and 2 different tenants

Article:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/intune_deviceconfig_macoscompliancepolicy_create

intune product

Most helpful comment

Use https://graph.microsoft.com/beta/deviceManagement/managedDevices instead. This will work. Please accommodate this change in your code going forward.

All 7 comments

Hi, I'm having the same issue.
Looks like the beta endpoint for ManagedDevices is not working right now and we get an internal server error 500.

Endpoint
GET https://graph.microsoft.com/beta/manageddevices

Other endpoints like users or devices are working, but manageddevices (Intune) is not working.

{
    "error": {
        "code": "UnknownError",
        "message": "{\"Message\":\"An internal server error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: baa1ee4e-6f79-465d-9306-56c21dd18b7d - Url: https://fef.msub02.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/managedDevices?api-version=5017-09-07 - CustomApiErrorPhrase: \"}",
        "innerError": {
            "request-id": "baa1ee4e-6f79-465d-9306-56c21dd18b7d",
            "date": "2017-12-13T14:13:42"
        }
    }
}

I know is in Beta but, Is there any official way to know the beta endpoint status? Just some information about this will be great...

From PowerShell:

Invoke-RestMethod : The remote server returned an error: (500) Internal Server Error.

Use https://graph.microsoft.com/beta/deviceManagement/managedDevices instead. This will work. Please accommodate this change in your code going forward.

I'm sorry but the original issue in this is still open??
The endpoint for compliance policies is:
/deviceManagement/deviceCompliancePolicies

Hi no but through F12 I found that there a new mandatory options you have to pass.

So this can be closed :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fredericklin picture fredericklin  路  3Comments

Chotimir picture Chotimir  路  3Comments

abhatt29 picture abhatt29  路  4Comments

GregSpyra picture GregSpyra  路  4Comments

andrewfabrizi picture andrewfabrizi  路  3Comments