deploymentAudience:updateAudienceByIddeploymentAudience: updateAudienceById

命名空间:microsoft.graph.windowsUpdatesNamespace: microsoft.graph.windowsUpdates


Microsoft Graph /beta 中的版本下的 API 可能会更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported. 若要确定 API 在 v1.0 中是否可用,请使用版本 选择 器。To determine whether an API is available in v1.0, use the Version selector.

使用相同类型的updatableAsset资源更新deploymentAudience的成员和排除集合。Update the members and exclusions collections of a deploymentAudience with updatableAsset resources of the same type.

向部署访问群体的成员或排除集合添加 azureADDevice 会自动创建 Azure AD 设备对象(如果该对象不存在)。Adding an azureADDevice to the members or exclusions collections of a deployment audience automatically creates an Azure AD device object if it does not already exist.

如果 deploymentAudience 的排除和 成员 集合中包含相同的 updatableAsset,则部署不会应用于该资产。 If the same updatableAsset gets included in the exclusions and members collections of a deploymentAudience, deployment will not apply to that asset.

您还可以使用 updateAudience 方法来更新 deploymentAudienceYou can also use the method updateAudience to update the deploymentAudience.


要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) WindowsUpdates.ReadWrite.AllWindowsUpdates.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application WindowsUpdates.ReadWrite.AllWindowsUpdates.ReadWrite.All

HTTP 请求HTTP request

POST /admin/windows/updates/deployments/{deploymentId}/audience/updateAudienceById

请求标头Request headers

名称Name 说明Description
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.
Content-TypeContent-Type application/json. Required.application/json. Required.

请求正文Request body

在请求正文中,提供参数的 JSON 表示形式。In the request body, supply JSON representation of the parameters.

下表显示了可用于此操作的参数。The following table shows the parameters that can be used with this action.

参数Parameter 类型Type 说明Description
memberEntityTypememberEntityType 字符串String 可更新资源的完整类型。The full type of the updatable assets. 可取值为:#microsoft.graph.windowsUpdates.azureADDevice#microsoft.graph.windowsUpdates.updatableAssetGroupPossible values are: #microsoft.graph.windowsUpdates.azureADDevice, #microsoft.graph.windowsUpdates.updatableAssetGroup.
addMembersaddMembers String collectionString collection 与要添加为部署访问群体成员的可更新资产对应的标识符列表。List of identifiers corresponding to the updatable assets to add as members of the deployment audience.
removeMembersremoveMembers String collectionString collection 与要作为部署访问群体成员删除的可更新资源相对应的标识符列表。List of identifiers corresponding to the updatable assets to remove as members of the deployment audience.
addExclusionsaddExclusions String collectionString collection 与要作为部署访问群体排除项添加的可更新资源相对应的标识符列表。List of identifiers corresponding to the updatable assets to add as exclusions from the deployment audience.
removeExclusionsremoveExclusions String collectionString collection 与要作为部署访问群体排除项删除的可更新资源相对应的标识符列表。List of identifiers corresponding to the updatable assets to remove as exclusions from the deployment audience.


如果成功,此操作返回 202 Accepted 响应代码。If successful, this action returns a 202 Accepted response code. 它不会在响应正文中返回任何内容。It does not return anything in the response body.



Content-Type: application/json
Content-length: 204

  "memberEntityType": "String",
  "addMembers": [
  "removeMembers": [
  "addExclusions": [
  "removeExclusions": [


HTTP/1.1 202 Accepted