on which device or OS Graph Api Intune Device Actions works

MOD Administrator 1 Reputation point
2021-06-03T08:01:21.237+00:00

Hello,

Our company works with big firms and many schools worldwide. We are creating a new product that going to use Google and Microsoft api to interact with user devices but we have problems with the Microsoft side. We opened a ticket to Microsoft and they redirected us to the Graph API team but they responded to us to open an issue here or StackOverflow.

We are using Microsoft Graph Api to retrieve data about devices. Now we are trying to use it for intune device actions but either we are getting error messages even though we followed everything at docs or nothing happens even though API response success.

  1. we checked the permissions and all needed permissions are given.
  2. we followed docs and tried multiple versions of API URLs mentioned in docs but none of them worked.
  3. we also tried the beta version of API but it didn't work either.
  4. We found some readings about some of these actions work specifically on some OS type or some specific device permissions but we can't find detail on docs.

So we want to use all actions on Intune devices but details on docs are not clear. So if you can clarify them or redirect us in the correct direction we will be happy. Because at this point we can not present the product to our customers.

I am getting the following error on related actions

POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/shutDown

{
    "error": {
        "code": "BadRequest",
        "message": "{  \"_version\": 3,  \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 2e274924-5fe1-453f-d869-671abf922cfd - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.shutDown?api-version=5021-04-16\",  \"CustomApiErrorPhrase\": \"\",  \"RetryAfter\": null,  \"ErrorSourceService\": \"\",  \"HttpHeaders\": \"{}\"}",
        "innerError": {
            "date": "2021-05-31T08:44:54",
            "request-id": "c869f3f9-def1-4d7f-93af-16b458bc0b17",
            "client-request-id": "2e274924-5fe1-453f-d869-671abf922cfd"
        }
    }
}

POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/remoteLock

{
    "error": {
        "code": "BadRequest",
        "message": "{  \"_version\": 3,  \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 6676f0a0-8895-302e-672b-3cdb66092428 - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.remoteLock?api-version=2021-04-07\",  \"CustomApiErrorPhrase\": \"\",  \"RetryAfter\": null,  \"ErrorSourceService\": \"\",  \"HttpHeaders\": \"{}\"}",
        "innerError": {
            "date": "2021-05-31T08:56:10",
            "request-id": "a360b06a-fb02-4af3-9f8f-06e138b76288",
            "client-request-id": "6676f0a0-8895-302e-672b-3cdb66092428"
        }
    }
}

I am getting a success response following actions but nothing happens to the devices

POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/rebootNow
POST https://graph.microsoft.com/v1.0//deviceManagement/managedDevices/{managedDeviceId}/wipe

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,248 questions
0 comments No comments
{count} votes