Hi @Akesh Jadhav ,
Thanks for reaching out.
To create and register a new device in the organization using Graph API, your app must be registered with the Microsoft identity platform and has Directory.AccessAsUser.All permissions in your registered application to register the device in Entra ID.
To register the device, user should have Intune Administrator, or Windows 365 Administrator or higher role.
Users need to authenticate to get the access token with required permissions/scope (Directory.AccessAsUser.All ) to call the below Graph API to register the device
POST https://graph.microsoft.com/v1.0/devices
Content-type: application/json
{
"accountEnabled":false,
"alternativeSecurityIds":
[
{
"type":2,
"key":"xxx"
}
],
"deviceId":"DeviceID",
"displayName":"DeviceName",
"operatingSystem":"OsName",
"operatingSystemVersion":"OsVersion"
}
Reference - https://learn.microsoft.com/en-us/graph/api/device-post-devices?view=graph-rest-1.0&tabs=http
Hope this will help.
Thanks,
Shweta
Please do not forget to "Accept the answer" to help others in the community.