Graph API via Powershell - Autopilot Assosiated Devices

ChristopherCoates 41 Reputation points
2022-08-25T00:50:27.933+00:00

I am having troubles obtaining some of the information i need via Graph API using powershell from Intune - Autopilot for windows devics.
In the auto pilot devices there are assosiated devices and ideally i need to be able to obtain this infor to run scripts againts all assosiated devices.

Can anyone point me to the correct Graph API command to retrieve the following fields from Autopilot?

234724-image.png

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.
407 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,320 questions
{count} votes

Accepted answer
  1. Lu Dai-MSFT 28,341 Reputation points
    2022-08-25T02:53:34.263+00:00

    @ChristopherCoates Thanks for posting in our Q&A.

    For this issue, when I click on "F12" to open DevTools and we can get the detail request in it. Please click on the target device and then we weill get the request.
    234650-image.png

    When I request the URL in Graph explorer, I didn't find that there is any value about "Associated Intune device" and "Associated Azure AD device".
    234660-image.png

    Based on my check in intune portal, I find that "Associated Intune device" and "Associated Azure AD device" usually show the device name. So, it is suggested to try to this workaround that run the second request URL and we will get the device name.
    234744-image.png

    234751-image.png

    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.

1 additional answer

Sort by: Most helpful
  1. ChristopherCoates 41 Reputation points
    2022-08-31T03:44:56.42+00:00

    Good Afternoon LuDaiMSFT-0289,

    I was able to obtain the information i needed by using your suggestion. To use powershell to obatin this i think in the end i had to install the WindowsAutoPilotIntune module & MGGraph.

    I was able to obtain the AADid and MEMid, and using these i was able to retrieve the device name from their respective consoles.

    0 comments No comments