Assign a user to a device through Graph API

Haibert Barfian 40 Reputation points


I am trying to find out how to assign a user with an intune license to a auto pilot managed device. I have mentioned bellow the link that SHOULD be the end point used to do this but the body parameters are not documented so I dont know how to use it really. Also, no sort of device identification is required in the body, which is strange since it would be needed to assign a user to it i'm sure. Any help is appreciated!

Windows Autopilot
Windows Autopilot
A collection of Microsoft technologies used to set up and pre-configure new devices and to reset, repurpose, and recover devices.
418 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,503 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lu Dai-MSFT 28,361 Reputation points

    @Haibert Barfian Thanks for posting in our Q&A.

    For this issue, I have done the test in my lab. I click on "F12" to open the Devtool to get the specific request.

    When I click on "Assign user" to assign a user to the autopilot device, I will get the request URL. From the request, we can see the specific windowsAutopilotDeviceIdentityId. And in my test, my graph api is not assignUserToDevice, it is UpdateDeviceProperties. User's image

    Then click on "Payload > view source", we can get the request body. User's image

    So, the request body is correct. The important is to find the "windowsAutopilotDeviceIdentityId".

    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