设备资源类型

命名空间:microsoft.graph

重要

Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

表示在目录中注册的设备。 可以在云中使用设备注册服务或 Intune 创建设备。 条件访问策略使用它们进行多重身份验证。 这些设备范围很广,从台式机、笔记本电脑到手机和平板电脑均包括在内。 继承自 directoryObject

此资源是允许传入其他属性的开放类型。 还可以将自己的数据作为 扩展添加到自定义属性。

方法

方法 返回类型 说明
获取设备 设备 读取设备对象的属性和关系。
List devices 设备 集合 检索目录中的注册设备列表。
更新设备 设备 更新设备对象的属性。
删除设备 删除设备对象。
delta 设备集合 获取设备的增量更改。
List memberOf directoryObject collection 列出设备是其直接成员的组和管理单元。
列出 transitive memberOf directoryObject collection 列出设备所属的组和管理单元。 此操作是可传递的。
列出 registeredOwners directoryObject 集合 通过 registeredOwners 导航属性,获取身份为设备注册所有者的用户。
列出 registeredUsers directoryObject 集合 从 registeredUsers 导航属性获取设备的注册用户。
列表 usageRights usageRight 集合 获取授予设备的使用权限的集合。
checkMemberGroups String collection 检查组列表中的成员身份。 检查是可传递的。
getMemberGroups String collection 返回设备所属的所有组。 检查是可传递的。
checkMemberObjects String 集合 检查组、目录角色或管理单元对象列表中的成员身份。
getMemberObjects String 集合 返回设备所属的所有组、管理单元和目录角色。 检查是可传递的。
开放扩展
创建开放扩展 openTypeExtension 创建开放扩展,并将自定义属性添加到新资源或现有资源。
获取开放扩展 openTypeExtension 集合 获取扩展名称标识的开放扩展。
架构扩展
添加架构扩展值 创建架构扩展定义,然后使用它向资源添加自定义键入数据。

属性

重要

仅当使用设置为 eventual$countConsistencyLevel 标头时,才支持 $filter$search 查询参数的特定用法。 有关详细信息,请参阅 目录对象的高级查询功能

属性 类型 说明
accountEnabled Boolean 启用帐户时为 true,否则为 false。 默认值为“true”。

支持 $filtereqnenotin)。 只有全局管理员和云设备管理员角色中的调用方可以设置此属性。
alternativeSecurityIds alternativeSecurityId 集合 仅供内部使用。 不可为 null。 支持 $filtereqnotgele)。
approximateLastSignInDateTime DateTimeOffset 时间戳类型使用 ISO 8601 格式表示日期和时间信息,并且始终采用 UTC 时间。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z。 只读。 支持 $filter) geneleeqnoteq 值 (null 、 和 。$orderby
complianceExpirationDateTime DateTimeOffset 设备不再被视为合规时的时间戳。 时间戳类型使用 ISO 8601 格式表示日期和时间信息,并且始终采用 UTC 时间。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z。 只读。
deviceCategory String 由 Intune 设置的用户定义的属性,可自动将设备添加到组并简化设备的管理。
deviceId String 注册时由 Azure 设备注册服务设置的唯一标识符。 这是可用于引用设备对象的备用键。 还支持 $filter (eqnenot) startsWith
deviceMetadata String 仅供内部使用。 设置为 null
deviceOwnership String 设备的所有权。 此属性由 Intune 设置。 可取值为:unknowncompanypersonal
deviceVersion Int32 仅供内部使用。
displayName String 设备显示名称。 必填。 支持 $filtereqnenotgeleinstartsWithnull 值上的 eq)、$search$orderby
domainName String Microsoft Entra混合联接设备的本地域名。 此属性由 Intune 设置。
enrollmentProfileName String 应用于设备的注册配置文件。 例如,Apple Device Enrollment ProfileDevice enrollment - Corporate device identifiersWindows Autopilot profile name。 此属性由 Intune 设置。
enrollmentType String 设备的注册类型。 此属性由 Intune 设置。 可取值为:unknownuserEnrollmentdeviceEnrollmentManagerappleBulkWithUserappleBulkWithoutUserwindowsAzureADJoinwindowsBulkUserlesswindowsAutoEnrollmentwindowsBulkAzureDomainJoinwindowsCoManagement
extensionAttributes onPremisesExtensionAttributes 包含设备的扩展属性 1-15。 单个扩展属性不可选择。 这些属性在云中主控,可以在 Microsoft Entra ID 中创建或更新设备对象期间设置。

支持 $filtereqnotstartsWithnull 值上的 eq)。
主机 名 字符串集合 设备的主机名列表。
id String 设备唯一标识符。 继承自 directoryObject。 密钥,不可为 NULL。 只读。 支持 $filtereqnenotin)。
isCompliant 布尔值 true如果设备符合移动设备管理 (MDM) 策略,则为 ;否则为 false。 此为只读属性。 这只能通过任何设备 OS 类型的Intune或 Windows OS 设备的已批准的 MDM 应用进行更新。 支持 $filtereqnenot)。
isManaged 布尔值 true如果设备由移动设备管理 (MDM) 应用管理,则为 ;否则为 false。 这只能通过任何设备 OS 类型的Intune或 Windows OS 设备的已批准的 MDM 应用进行更新。 支持 $filtereqnenot)。
isManagementRestricted 布尔值 指示设备是否是受限管理管理单元的成员,在这种情况下,它需要限定为受限管理单元的角色才能进行管理。 默认值为 false。 此为只读属性。

若要管理属于受限管理单元的设备,必须为调用应用分配 Directory.Write.Restricted 权限。 对于委派方案,还必须在受限管理单元范围内显式为管理员分配受支持的角色。
isRooted 布尔值 true 如果设备已获取 root 权限,则为 ; false 如果设备已越狱,则为 。 此属性只能通过Intune进行更新。
kind String 设备的外形规格。 仅当用户使用 Microsoft 帐户作为 Project Rome 的一部分登录时返回。
managementType String 设备的管理通道。 此属性由 Intune 设置。 可取值为:easmdmeasMdmintuneClienteasIntuneClientconfigurationManagerClientconfigurationManagerClientMdmconfigurationManagerClientMdmEasunknownjamfgoogleCloudDevicePolicyController
manufacturer String 设备的制造商。 此为只读属性。
mdmAppId String 用于将设备注册到 MDM 的应用程序标识符。 只读。 支持 $filtereqnenotstartsWith)。
model String 设备的型号。 只读。
name String 设备的友好名称。 仅当用户使用 Microsoft 帐户作为 Project Rome 的一部分登录时才返回。
onPremisesLastSyncDateTime DateTimeOffset 对象上次与本地目录同步的时间。 时间戳类型表示采用 ISO 8601 格式的日期和时间信息,始终采用 UTC 时区。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z 只读。 支持 $filtereqnenotgelein)。
onPremisesSecurityIdentifier String 对于从本地同步到云的用户,本地安全标识符 (SID) 。 只读。 仅在 $select 上返回。 支持 $filtereq)。
onPremisesSyncEnabled Boolean 如果此对象从本地目录同步,则为 true;如果此对象最初从本地目录同步,但以后不再同步,则为 false;如果此对象从未从本地目录同步,则为 null(默认值)。 只读。 支持 $filtereqnenotinnull 值上的 eq)。
operatingSystem String 设备上操作系统的类型。 必填。 支持$filter对值) (neeqnot、、gelestartsWith、 和 。eqnull
operatingSystemVersion String 设备的操作系统版本。 必填。 支持$filter对值) (neeqnot、、gelestartsWith、 和 。eqnull
physicalIds 字符串集合 仅供内部使用。 不可为 null。 支持 $filter (eq、、notgelestartsWith/$count eq 0、 。 /$count ne 0
平台 String 设备平台。 仅当用户使用 Microsoft 帐户作为 Project Rome 的一部分登录时返回。
profileType String 设备的配置文件类型。 可能的值: RegisteredDevice (默认) 、SecureVMPrinterSharedIoT
registrationDateTime DateTimeOffset 注册设备的日期和时间。 时间戳类型使用 ISO 8601 格式表示日期和时间信息,并且始终采用 UTC 时间。 例如,2014 年 1 月 1 日午夜 UTC 为 2014-01-01T00:00:00Z。 只读。
status String 设备为 onlineoffline。 仅当用户使用 Microsoft 帐户作为 Project Rome 的一部分登录时才返回。
systemLabels 字符串集合 系统应用于设备的标签列表。 支持 $filter/$count eq 0/$count ne 0)。
trustType String 加入设备的信任类型。 此为只读属性。 可能的值: Workplace (指示将自己的个人设备) AzureAd (仅限云加入的设备) , ServerAd (已加入本地域的设备加入Microsoft Entra ID) 。 有关详细信息,请参阅 Microsoft Entra ID 中的设备管理简介

关系

关系 类型 说明
命令 命令 集合 发送到此设备的命令集。
extensions 扩展集合 为设备定义的开放扩展的集合。 此为只读属性。 可为 NULL。
memberOf directoryObject collection 此设备所属的组和管理单元。 此为只读属性。 可为 NULL。 支持 $expand
registeredOwners directoryObject 集合 云加入设备或已注册个人设备的用户。 已注册的所有者是在注册时设置。 此为只读属性。 可为 NULL。 支持 $expand
registeredUsers directoryObject 集合 设备的已注册用户集合。 对于云加入设备和已注册的个人设备,已注册用户在设备注册时设置为与已注册所有者相同的值。 只读。 可为 NULL。 支持 $expand
transitiveMemberOf directoryObject 集合 此设备所属的组和管理单元。 此操作是可传递的。 支持 $expand
usageRights usageRight 集合 表示已授予设备的使用权限。

JSON 表示形式

下面是资源的 JSON 表示形式。

{
  "accountEnabled": "Boolean",
  "approximateLastSignInDateTime": "String (timestamp)",
  "complianceExpirationDateTime": "String (timestamp)",
  "deviceCategory": "String",
  "deviceId": "String",
  "deviceMetadata": "String",
  "deviceOwnership": "String",
  "deviceVersion": "Int32",
  "displayName": "String",
  "domainName": "String",
  "enrollmentProfileName": "String",
  "enrollmentType": "String",
  "extensionAttributes": {"@odata.type": "microsoft.graph.onPremisesExtensionAttributes"},
  "hostnames" : ["String"],
  "id": "String (identifier)",
  "isCompliant": "Boolean",
  "isManaged": "Boolean",
  "isRooted": "Boolean",
  "kind": "String",
  "managementType": "String",
  "manufacturer": "String",
  "mdmAppId": "String",
  "model": "String",
  "name": "String",
  "onPremisesLastSyncDateTime": "String (timestamp)",
  "onPremisesSecurityIdentifier": "Boolean",
  "onPremisesSyncEnabled": "Boolean",
  "operatingSystem": "String",
  "operatingSystemVersion": "String",
  "physicalIds": ["String"],
  "platform": "String",
  "profileType": "String",
  "registrationDateTime": "String (timestamp)",
  "status": "String",
  "systemLabels": ["String"],
  "trustType": "String"
}