Loading...

Autopilot Device Preparation: Import Corporate Device Identifier using Graph API and PowerShell

Reply A+ A-


In this post I will show you how to import Corporate Device Identifier for a device using Graph API and PowerShell for the new Autopilot Device Preparation.


Autopilot Device Preparation

On the May 22nd, Microsoft announced the new Autopilot v2, which a new kind of profile called Autopilot Device Preparation.

I wont explained what it is there because you can already get a loooot of articles about this.


See here really interesting articles:

https://www.joeyverlinden.com/windows-deployment-with-autopilot-device-preparation/

https://joostgelijsteen.com/autopilot-device-preparation/

https://call4cloud.nl/2024/06/autopilot-device-preparation-the-hardware-hash-voyage-home/

https://skotheimsvik.no/autopilot-device-preparation-how-to-collect-windows-corporate-device-identifier


What's next ?

In the next post I will share a script that will automatically import Corporate Device Identifier for a group of devices.


Import Corporate Device Identifier through the portal

Importing the Corporate Device Identifier through the Intune portal can be achieved by importing a CSV file.

This CSV should contain following info: Manufacturer,Model,SerialNumber.

See below a script allowing you to create this CSV:

See below how to proceed:

1. Go to the Intune

2. Go to Devices Enrollment Corporate Device Identifier


3. Click on Add


4. Click on Upload a CSV file

5. Go to Select identifier Type

6. Select Manufacturer, model and serial number

7. Import the CSV file

8. Click on Add


Import Corporate Device Identifier with Graph API

When a new feature comes in Intune I always try to look to MS Graph in order to understand how to automate the action.

To do this I always use the developer mode from my browser.

I think every people who want to play with Graph should use this trick.

You can find here a post I did about this.

So now lets use just our browser to understand how to use Graph to get results we want.

For this we will proceed as below:

1. Go to the Intune

3. Go to Devices > Enrollment > Corporate Device Identifier


4. Click on Add > Upload a CSV file


5. Go to Select identifier Type

6. Select Manufacturer, model and serial number


7. Click on Import identifiers

8. Press F12 to open developer mode

9. Select the Network tab


10. Click on Add

11. Click on the Stop recording button

12. You will find a resource called importDeviceIdentityList


13. Click on it



14. You will find the URL resource

15. Go to Payload to see the body to pass


Now you have the resource to use and body.

See below permissions needed:


See below the full script to import a Corporate Device Identifier to Intune through Graph API.

slider 2848442645210702846

Enregistrer un commentaire

Accueil item

Award

Sponsors

Sponsors

Learn KQL in one month

You want to support me ?

Mes articles en français

Books in French


Stats