按设备名称获取设备
API 说明
按设备名称检索设备。
先决条件
要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限。
权限类型 | 权限 |
---|---|
Delegated | MWaaSDevice.Read |
应用程序 | MmdSupport.ReadWrite |
HTTP 请求
GET https://mmdls.microsoft.com/support/odata/v1/tenants/{tenantId}/devices/{devicename}
请求标头
标头 | 值 |
---|---|
Authorization | 持有者 {token} (必需) |
接受 | application/json |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应正文中返回 200 正常响应代码和设备列表。
示例
示例请求
下面是 HTTP 请求的示例。
GET https://mmdls.microsoft.com/support/odata/v1/tenants/{tenantId}/devices/MMD-123456789
示例响应
下面是 JSON 响应的示例。
注意
为简洁起见,可能会截断所示的响应列表。 所有设备将从实际调用返回。
{
"@odata.context": "https://mmd-support-prod-nam.trafficmanager.net/odata/v1/$metadata#Devices/$entity",
"name": "MMD-123456789",
"intuneId": "Intune Id value",
"manufacturer": "Microsoft Corporation",
"model": "Virtual Machine",
"serialNumber": "Serial number value",
"globalDeviceId": "g:value",
"enrolledIntoIntuneDateTimeUtc": "2021-07-05T09:22:13.729238Z",
"tenantId": "Tenant Id value",
"tenantName": null,
"assignedUser": "firstName lastName",
"userUpn": "username@contoso.onmicrosoft.com",
"userEmail": "username@contoso.onmicrosoft.com",
"complianceState": "NonCompliant",
"osVersion": "10.0.19043.1586",
"primaryUpdateRing": "Test",
"lastIntuneSyncDateTimeUtc": "2021-04-13T04:37:09.6615599Z",
"ageInMonths": 9.274547,
"planType": "Premium",
"persona": "Standard",
"aadDeviceId": "aadDeviceId",
"managementAgent": "Intune",
"operatingSystemEdition": "Enterprise",
"profileAssignmentStatus": "Successful",
"groups": [
{
"id": "46bde30a-9113-4f1e-b169-d9e178f41fa7",
"displayName": "Modern Workplace Devices-Test",
"description": "Immediate ring for device rollout",
"countMembers": null
},
{
"id": "58834fcf-e369-463f-9405-e856e8de60f6",
"displayName": "Modern Workplace Device Profiles - Standard",
"description": "Devices with a secure experience",
"countMembers": null
}
...
],
"configurations": [
{
"id": "57dc3bb4-7b7f-4052-b9af-0a9c31586e9e",
"type": "Policy",
"name": "Modern Workplace - Standard Device Profile Configuration",
"version": "1",
"createdUtc": "2021-06-22T01:29:53.4328287Z",
"lastModifiedUtc": "2021-06-22T01:29:53.4328287Z",
"deploymentStatus": "Compliant",
"lastReportedStatusUtc": "2021-02-09T07:44:52.6201692Z"
},
{
"id": "1d576a6f-d0b9-4df7-ba3c-1216965caa3d",
"type": "Policy",
"name": "Modern Workplace - Edge Update Policy [Test]",
"version": "2",
"createdUtc": "2021-11-09T00:57:00.2017126Z",
"lastModifiedUtc": "2021-12-22T20:38:39.5457039Z",
"deploymentStatus": "Compliant",
"lastReportedStatusUtc": "2021-02-09T07:44:52.6201692Z"
},
{
"id": "f0cb96d3-527f-4532-8675-1518f7aa813f",
"type": "Script",
"name": "Modern Workplace - Configure AppV",
"version": "0",
"createdUtc": "2021-07-21T02:00:31.1331001Z",
"lastModifiedUtc": "2021-07-21T02:00:31.1331001Z",
"deploymentStatus": "Success",
"lastReportedStatusUtc": "2021-02-09T07:51:06Z"
},
{
"id": "ba8215d7-1aed-4a77-8546-62b1e1a5a981",
"type": "App",
"name": "Modern Workplace - Teams Machine Wide Installer x32",
"version": "",
"createdUtc": "2021-02-05T19:26:46.6049199Z",
"lastModifiedUtc": "2021-10-20T17:28:49.654275Z",
"deploymentStatus": "NotApplicable",
"lastReportedStatusUtc": "0001-01-01T00:00:00Z"
}
...
]
}