"Create importedDeviceIdentity" doesn't work

Sho Narita 21 Reputation points
2021-07-09T10:29:06.663+00:00

I cannot create importedDeviceIdentity by using the following API.
https://learn.microsoft.com/en-us/graph/api/intune-enrollment-importeddeviceidentity-create?view=graph-rest-beta

Remote Server Error (400) is returned even if I execute the request using the example in the document.

-----
$url = "https://graph.microsoft.com/beta/deviceManagement/importedDeviceIdentities"
$body = @'
{
"@odata.type": "#microsoft.graph.importedDeviceIdentity",
"importedDeviceIdentifier": "Imported Device Identifier value",
"importedDeviceIdentityType": "imei",
"lastContactedDateTime": "2016-12-31T23:58:44.2908994-08:00",
"description": "Description value",
"enrollmentState": "enrolled",
"platform": "ios"
}
'@
$res = Invoke-RestMethod -Method POST -Uri $url -Headers $header -Body $body -ContentType "application/json"
$res
-----

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,053 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jarvis Sun-MSFT 10,196 Reputation points Microsoft Vendor
    2021-07-12T09:08:45.823+00:00

    @Sho Narita Thanks for posting in our Q&A.
    For our issue, I have done some tests. Through the graph explorer test, the returned result is failed. We have analyzed some code reasons, which are beyond our ability scope. With the limitation of Q&A forum, It is better to create an online support ticket to handle this issue. It is free. Here is the online support link and hope it will be resolved as soon as possible.
    https://learn.microsoft.com/en-us/mem/intune/fundamentals/get-support
    Thanks for your understanding.


    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.


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.