Update externalItem

Namespace: microsoft.graph.externalConnectors

Update the properties of an externalItem object.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) ExternalItem.ReadWrite.OwnedBy ExternalItem.ReadWrite.All
Delegated (personal Microsoft account) Not supported. Not supported.
Application ExternalItem.ReadWrite.OwnedBy ExternalItem.ReadWrite.All

HTTP request

PUT /external/connections/{connection-id}/items/{item-id}

Path parameters

Parameter Type Description
connection-id string The id property of the containing externalConnection
item-id string The developer-provided id property of the externalItem.

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties (excluding properties inside the properties object) that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance, don't include existing values that haven't changed. The following properties can be updated.

Property Type Description
acl microsoft.graph.externalConnectors.acl collection An array of access control entries. Each entry specifies the access granted to a user or group.
content microsoft.graph.externalConnectors.externalItemContent A plain-text representation of the contents of the item. The text in this property is full-text indexed.
properties Object A property bag with the properties of the item. The properties MUST conform to the schema defined for the externalConnection.

Updating the acl collection

If the acl property is included in an update request, the existing ACL collection is overwritten with the collection included in the request.

Updating the properties object

If the properties property is included in an update request, the existing property bag is overwritten with the value included in the request.

Response

If successful, this method returns a 200 OK response code and an updated externalItem object in the response body.

Examples

Request

PUT https://graph.microsoft.com/v1.0/external/connections/contosohr/items/TSP228082938
Content-Type: application/json

{
  "acl": [
    {
      "type": "everyone",
      "value": "67a141d8-cf4e-4528-ba07-bed21bfacd2d",
      "accessType": "grant"
    }
  ]
}

Response

The following example shows the response.

HTTP/1.1 200 OK
Content-type: application/json

{
  "id": "TSP228082938",
  "acl": [
    {
      "type": "everyone",
      "value": "67a141d8-cf4e-4528-ba07-bed21bfacd2d",
      "accessType": "grant"
    }
  ],
  "properties": {
    "title": "Error in the payment gateway",
    "priority": 1,
    "assignee": "john@contoso.com"
  },
  "content": {
    "@odata.type": "microsoft.graph.externalConnectors.externalItemContent",
    "value": "<h1>Error in payment gateway</h1><p>Error details...</p>",
    "type": "html"
  }
}