Update externalItem

Namespace: microsoft.graph.externalConnectors

Update the properties of an externalItem object.

Permissions

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) ExternalItem.ReadWrite.OwnedBy, ExternalItem.ReadWrite.All
Delegated (personal Microsoft account) Not supported
Application ExternalItem.ReadWrite.OwnedBy, ExternalItem.ReadWrite.All

HTTP request

PATCH /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.
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

PATCH 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 is an example of 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"
  }
}