APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
The developer-provided id property of the externalItem. If no item already exists with this id, a new item is created. If an item already exists with this id, it is overwritten by the object sent in the body.
Request headers
Name
Description
Authorization
Bearer {token}. Required.
Content-Type
application/json. Required.
Request body
In the request body, supply a JSON representation of an externalItem object. The payload is limited to 4 MB.
Creating an externalItem
When creating an externalItem, the following fields are required: acl, and properties. The properties object must contain at least one property.
All DateTime type properties must be in ISO 8601 format.
Properties on an externalItem should use type specifiers in the payload in the following scenarios:
For String type properties, if the value contains non-ASCII characters.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem
{
Acl = new List<Microsoft.Graph.Beta.Models.ExternalConnectors.Acl>
{
new Microsoft.Graph.Beta.Models.ExternalConnectors.Acl
{
Type = Microsoft.Graph.Beta.Models.ExternalConnectors.AclType.User,
Value = "e811976d-83df-4cbd-8b9b-5215b18aa874",
AccessType = Microsoft.Graph.Beta.Models.ExternalConnectors.AccessType.Grant,
IdentitySource = Microsoft.Graph.Beta.Models.ExternalConnectors.IdentitySourceType.AzureActiveDirectory,
},
new Microsoft.Graph.Beta.Models.ExternalConnectors.Acl
{
Type = Microsoft.Graph.Beta.Models.ExternalConnectors.AclType.Group,
Value = "14m1b9c38qe647f6a",
AccessType = Microsoft.Graph.Beta.Models.ExternalConnectors.AccessType.Deny,
IdentitySource = Microsoft.Graph.Beta.Models.ExternalConnectors.IdentitySourceType.External,
},
},
Properties = new Microsoft.Graph.Beta.Models.ExternalConnectors.Properties
{
AdditionalData = new Dictionary<string, object>
{
{
"title" , "Error in the payment gateway"
},
{
"priority" , 1
},
{
"assignee" , "john@contoso.com"
},
},
},
Content = new Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItemContent
{
Value = "Error in payment gateway...",
Type = Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItemContentType.Text,
},
};
var result = await graphClient.External.Connections["{externalConnection-id}"].Items["{externalItem-id}"].PutAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Import-Module Microsoft.Graph.Search
$params = @{
acl = @(
@{
type = "user"
value = "e811976d-83df-4cbd-8b9b-5215b18aa874"
accessType = "grant"
identitySource = "azureActiveDirectory"
}
@{
type = "group"
value = "14m1b9c38qe647f6a"
accessType = "deny"
identitySource = "external"
}
)
properties = @{
title = "Error in the payment gateway"
priority =
assignee = "john@contoso.com"
}
content = @{
value = "Error in payment gateway..."
type = "text"
}
}
Set-MgExternalConnectionItem -ExternalConnectionId $externalConnectionId -ExternalItemId $externalItemId -BodyParameter $params
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new ExternalItem();
$aclAcl1 = new Acl();
$aclAcl1->setType(new AclType('user'));
$aclAcl1->setValue('e811976d-83df-4cbd-8b9b-5215b18aa874');
$aclAcl1->setAccessType(new AccessType('grant'));
$aclAcl1->setIdentitySource(new IdentitySourceType('azureactivedirectory'));
$aclArray []= $aclAcl1;
$aclAcl2 = new Acl();
$aclAcl2->setType(new AclType('group'));
$aclAcl2->setValue('14m1b9c38qe647f6a');
$aclAcl2->setAccessType(new AccessType('deny'));
$aclAcl2->setIdentitySource(new IdentitySourceType('external'));
$aclArray []= $aclAcl2;
$requestBody->setAcl($aclArray);
$properties = new Properties();
$additionalData = [
'title' => 'Error in the payment gateway',
'priority' => 1,
'assignee' => 'john@contoso.com',
];
$properties->setAdditionalData($additionalData);
$requestBody->setProperties($properties);
$content = new ExternalItemContent();
$content->setValue('Error in payment gateway...');
$content->setType(new ExternalItemContentType('text'));
$requestBody->setContent($content);
$result = $graphServiceClient->external()->connections()->byConnectionId('externalConnection-id')->items()->byItemId('externalItem-id')->put($requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// THE PYTHON SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
client = GraphServiceClient(request_adapter)
request_body = ExternalItem()
acl_acl1 = Acl()
acl_acl1.type(AclType.User('acltype.user'))
acl_acl1.value = 'e811976d-83df-4cbd-8b9b-5215b18aa874'
acl_acl1.accesstype(AccessType.Grant('accesstype.grant'))
acl_acl1.identitysource(IdentitySourceType.AzureActiveDirectory('identitysourcetype.azureactivedirectory'))
aclArray []= aclAcl1;
acl_acl2 = Acl()
acl_acl2.type(AclType.Group('acltype.group'))
acl_acl2.value = '14m1b9c38qe647f6a'
acl_acl2.accesstype(AccessType.Deny('accesstype.deny'))
acl_acl2.identitysource(IdentitySourceType.External('identitysourcetype.external'))
aclArray []= aclAcl2;
request_body.acl(aclArray)
properties = Properties()
additional_data = [
'title' => 'Error in the payment gateway',
'priority' => 1,
'assignee' => 'john@contoso.com',
];
properties.additional_data(additional_data)
request_body.properties = properties
content = ExternalItemContent()
content.value = 'Error in payment gateway...'
content.type(ExternalItemContentType.Text('externalitemcontenttype.text'))
request_body.content = content
result = await client.external.connections.by_connection_id('externalConnection-id').items.by_item_id('externalItem-id').put(request_body = request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.