question

DAMIENVANROBAEYS-8458 avatar image
0 Votes"
DAMIENVANROBAEYS-8458 asked ·

createDeviceLogCollectionRequest : bad request

Hello,
When I try the action createDeviceLogCollectionRequest from graph explorer I have an errer bad request.
I use the below query:
https://graph.microsoft.com/beta/deviceManagement/managedDevices('e5bb60c1-be49-44d6-be9a-888a412621b5')/createDeviceLogCollectionRequest

This one sems correct, because when I run the action from the endpoint manager portal, F12 dev part gives me this URL with method POST.

However when I run it from graph explorer, I have an error.

mem-intune-general
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Crystal-MSFT avatar image
0 Votes"
Crystal-MSFT answered ·

@DAMIENVANROBAEYS-8458, Doing research and find an article in GitHud describe the createDeviceLogCollectionRequest action.
https://github.com/microsoftgraph/microsoft-graph-docs/blob/master/api-reference/beta/api/intune-devices-manageddevice-createdevicelogcollectionrequest.md

We can read the above articles to see if it can help. If the issue persists, as Q&A is with limitation resource, we suggest to contact Intune support to get more help:
https://docs.microsoft.com/en-us/mem/get-support

Thanks for the understanding and have a nice day!


If the response is helpful, please click "Accept Answer" and upvote it.
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.


· 21 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Actually when you collect logs from the portal using the developper mode, the process works as below:

When you click on the Collect diagnostics (from the top bar) this will run the below query:
POST https://graph.microsoft.com/beta/deviceManagement/managedDevices('a9ea6d32-bd1c-4222-8322-88d1b1aad256')/createDeviceLogCollectionRequest

0 Votes 0 ·

Then when you click on Device diagnostics (from the side bar) this will run the below query:
GET https://graph.microsoft.com/beta/deviceManagement/managedDevices('a9ea6d32-bd1c-4222-8322-88d1b1aad256')/logCollectionRequests

Then you have the log to download. Once you click on the Download button, this will run the below query:
POST https://graph.microsoft.com/beta/deviceManagement/managedDevices('a9ea6d32-bd1c-4222-8322-88d1b1aad256')/logCollectionRequests('e5dc5f80-550a-4b9f-8404-849a72e828ba')/createDownloadUrl

0 Votes 0 ·

In my case i'm looking for the 1st step (for now)
If you check the createDeviceLogCollectionRequest documentation this will give the same query than this one used from developper mode:
https://docs.microsoft.com/en-us/graph/api/intune-devices-manageddevice-createdevicelogcollectionrequest?view=graph-rest-beta

0 Votes 0 ·
Show more comments