Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen.
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die angegeben werden müssen, wenn Sie ein Objekt des Typs deviceManagementExchangeConnector erstellen.
Eigenschaft
Typ
Beschreibung
id
String
Noch nicht dokumentiert
lastSyncDateTime
DateTimeOffset
Zeit der letzten Synchronisierung für Exchange Connector
Der konfigurierte Typ von Exchange Connector. Mögliche Werte: onPremises, hosted, serviceToService, dedicated, unknownFutureValue.
Version
String
Die Version des ExchangeConnectorAgent
exchangeAlias
String
Ein dem Exchange-Server zugewiesener Alias
exchangeOrganization
String
Exchange-Organisation für den Exchange-Server
Antwort
Bei erfolgreicher Ausführung gibt die Methode den Antwortcode 200 OK und ein aktualisiertes Objekt des Typs deviceManagementExchangeConnector im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceManagementExchangeConnector
{
OdataType = "#microsoft.graph.deviceManagementExchangeConnector",
LastSyncDateTime = DateTimeOffset.Parse("2017-01-01T00:02:49.3205976-08:00"),
Status = DeviceManagementExchangeConnectorStatus.ConnectionPending,
PrimarySmtpAddress = "Primary Smtp Address value",
ServerName = "Server Name value",
ConnectorServerName = "Connector Server Name value",
ExchangeConnectorType = DeviceManagementExchangeConnectorType.Hosted,
Version = "Version value",
ExchangeAlias = "Exchange Alias value",
ExchangeOrganization = "Exchange Organization value",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.ExchangeConnectors["{deviceManagementExchangeConnector-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceManagementExchangeConnector deviceManagementExchangeConnector = new DeviceManagementExchangeConnector();
deviceManagementExchangeConnector.setOdataType("#microsoft.graph.deviceManagementExchangeConnector");
OffsetDateTime lastSyncDateTime = OffsetDateTime.parse("2017-01-01T00:02:49.3205976-08:00");
deviceManagementExchangeConnector.setLastSyncDateTime(lastSyncDateTime);
deviceManagementExchangeConnector.setStatus(DeviceManagementExchangeConnectorStatus.ConnectionPending);
deviceManagementExchangeConnector.setPrimarySmtpAddress("Primary Smtp Address value");
deviceManagementExchangeConnector.setServerName("Server Name value");
deviceManagementExchangeConnector.setConnectorServerName("Connector Server Name value");
deviceManagementExchangeConnector.setExchangeConnectorType(DeviceManagementExchangeConnectorType.Hosted);
deviceManagementExchangeConnector.setVersion("Version value");
deviceManagementExchangeConnector.setExchangeAlias("Exchange Alias value");
deviceManagementExchangeConnector.setExchangeOrganization("Exchange Organization value");
DeviceManagementExchangeConnector result = graphClient.deviceManagement().exchangeConnectors().byDeviceManagementExchangeConnectorId("{deviceManagementExchangeConnector-id}").patch(deviceManagementExchangeConnector);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\DeviceManagementExchangeConnector;
use Microsoft\Graph\Generated\Models\DeviceManagementExchangeConnectorStatus;
use Microsoft\Graph\Generated\Models\DeviceManagementExchangeConnectorType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new DeviceManagementExchangeConnector();
$requestBody->setOdataType('#microsoft.graph.deviceManagementExchangeConnector');
$requestBody->setLastSyncDateTime(new \DateTime('2017-01-01T00:02:49.3205976-08:00'));
$requestBody->setStatus(new DeviceManagementExchangeConnectorStatus('connectionPending'));
$requestBody->setPrimarySmtpAddress('Primary Smtp Address value');
$requestBody->setServerName('Server Name value');
$requestBody->setConnectorServerName('Connector Server Name value');
$requestBody->setExchangeConnectorType(new DeviceManagementExchangeConnectorType('hosted'));
$requestBody->setVersion('Version value');
$requestBody->setExchangeAlias('Exchange Alias value');
$requestBody->setExchangeOrganization('Exchange Organization value');
$result = $graphServiceClient->deviceManagement()->exchangeConnectors()->byDeviceManagementExchangeConnectorId('deviceManagementExchangeConnector-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.device_management_exchange_connector import DeviceManagementExchangeConnector
from msgraph.generated.models.device_management_exchange_connector_status import DeviceManagementExchangeConnectorStatus
from msgraph.generated.models.device_management_exchange_connector_type import DeviceManagementExchangeConnectorType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DeviceManagementExchangeConnector(
odata_type = "#microsoft.graph.deviceManagementExchangeConnector",
last_sync_date_time = "2017-01-01T00:02:49.3205976-08:00",
status = DeviceManagementExchangeConnectorStatus.ConnectionPending,
primary_smtp_address = "Primary Smtp Address value",
server_name = "Server Name value",
connector_server_name = "Connector Server Name value",
exchange_connector_type = DeviceManagementExchangeConnectorType.Hosted,
version = "Version value",
exchange_alias = "Exchange Alias value",
exchange_organization = "Exchange Organization value",
)
result = await graph_client.device_management.exchange_connectors.by_device_management_exchange_connector_id('deviceManagementExchangeConnector-id').patch(request_body)
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 539
{
"@odata.type": "#microsoft.graph.deviceManagementExchangeConnector",
"id": "e11c1de8-1de8-e11c-e81d-1ce1e81d1ce1",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"status": "connectionPending",
"primarySmtpAddress": "Primary Smtp Address value",
"serverName": "Server Name value",
"connectorServerName": "Connector Server Name value",
"exchangeConnectorType": "hosted",
"version": "Version value",
"exchangeAlias": "Exchange Alias value",
"exchangeOrganization": "Exchange Organization value"
}