Namespace: microsoft.graph
Hinweis: Die Microsoft Graph-API für Intune setzt eine aktive Intune-Lizenz für den Mandanten voraus.
Aktualisieren der Eigenschaften eines remoteAssistancePartner-Objekts.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
✅ |
✅ |
✅ |
✅ |
Berechtigungen
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) |
Delegiert (Geschäfts-, Schul- oder Unikonto) |
DeviceManagementServiceConfig.ReadWrite.All |
Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Anwendung |
DeviceManagementServiceConfig.ReadWrite.All |
HTTP-Anforderung
PATCH /deviceManagement/remoteAssistancePartners/{remoteAssistancePartnerId}
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des remoteAssistancePartner-Objekts an.
In der folgenden Tabelle sind die Eigenschaften dargestellt, die zum Erstellen des remoteAssistancePartner erforderlich sind.
Eigenschaft |
Typ |
Beschreibung |
id |
String |
Der eindeutige Bezeichner des Partners. |
displayName |
String |
Der Anzeigename des Partners. |
onboardingUrl |
String |
Die URL des Onboarding-Portals des Partners, in dem ein Administrator den Remoteunterstützungsdienst konfigurieren kann. |
onboardingStatus |
remoteAssistanceOnboardingStatus |
Eine benutzerfreundliche Beschreibung des aktuellen TeamViewer-Connectors status. Mögliche Werte sind: notOnboarded , onboarding und onboarded . |
lastConnectionDateTime |
DateTimeOffset |
Zeitstempel der letzten vom TEM-Partner an Intune gesendeten Anforderung |
Antwort
Wenn die Methode erfolgreich verläuft, werden der Antwortcode 200 OK
und das aktualisierte remoteAssistancePartner-Objekt im Antworttext zurückgegeben.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/remoteAssistancePartners/{remoteAssistancePartnerId}
Content-type: application/json
Content-length: 266
{
"@odata.type": "#microsoft.graph.remoteAssistancePartner",
"displayName": "Display Name value",
"onboardingUrl": "https://example.com/onboardingUrl/",
"onboardingStatus": "onboarding",
"lastConnectionDateTime": "2016-12-31T23:58:36.6670033-08:00"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new RemoteAssistancePartner
{
OdataType = "#microsoft.graph.remoteAssistancePartner",
DisplayName = "Display Name value",
OnboardingUrl = "https://example.com/onboardingUrl/",
OnboardingStatus = RemoteAssistanceOnboardingStatus.Onboarding,
LastConnectionDateTime = DateTimeOffset.Parse("2016-12-31T23:58:36.6670033-08:00"),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.RemoteAssistancePartners["{remoteAssistancePartner-id}"].PatchAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
mgc device-management remote-assistance-partners patch --remote-assistance-partner-id {remoteAssistancePartner-id} --body '{\
"@odata.type": "#microsoft.graph.remoteAssistancePartner",\
"displayName": "Display Name value",\
"onboardingUrl": "https://example.com/onboardingUrl/",\
"onboardingStatus": "onboarding",\
"lastConnectionDateTime": "2016-12-31T23:58:36.6670033-08:00"\
}\
'
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewRemoteAssistancePartner()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
onboardingUrl := "https://example.com/onboardingUrl/"
requestBody.SetOnboardingUrl(&onboardingUrl)
onboardingStatus := graphmodels.ONBOARDING_REMOTEASSISTANCEONBOARDINGSTATUS
requestBody.SetOnboardingStatus(&onboardingStatus)
lastConnectionDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:58:36.6670033-08:00")
requestBody.SetLastConnectionDateTime(&lastConnectionDateTime)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
remoteAssistancePartners, err := graphClient.DeviceManagement().RemoteAssistancePartners().ByRemoteAssistancePartnerId("remoteAssistancePartner-id").Patch(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
RemoteAssistancePartner remoteAssistancePartner = new RemoteAssistancePartner();
remoteAssistancePartner.setOdataType("#microsoft.graph.remoteAssistancePartner");
remoteAssistancePartner.setDisplayName("Display Name value");
remoteAssistancePartner.setOnboardingUrl("https://example.com/onboardingUrl/");
remoteAssistancePartner.setOnboardingStatus(RemoteAssistanceOnboardingStatus.Onboarding);
OffsetDateTime lastConnectionDateTime = OffsetDateTime.parse("2016-12-31T23:58:36.6670033-08:00");
remoteAssistancePartner.setLastConnectionDateTime(lastConnectionDateTime);
RemoteAssistancePartner result = graphClient.deviceManagement().remoteAssistancePartners().byRemoteAssistancePartnerId("{remoteAssistancePartner-id}").patch(remoteAssistancePartner);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const remoteAssistancePartner = {
'@odata.type': '#microsoft.graph.remoteAssistancePartner',
displayName: 'Display Name value',
onboardingUrl: 'https://example.com/onboardingUrl/',
onboardingStatus: 'onboarding',
lastConnectionDateTime: '2016-12-31T23:58:36.6670033-08:00'
};
await client.api('/deviceManagement/remoteAssistancePartners/{remoteAssistancePartnerId}')
.update(remoteAssistancePartner);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\RemoteAssistancePartner;
use Microsoft\Graph\Generated\Models\RemoteAssistanceOnboardingStatus;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new RemoteAssistancePartner();
$requestBody->setOdataType('#microsoft.graph.remoteAssistancePartner');
$requestBody->setDisplayName('Display Name value');
$requestBody->setOnboardingUrl('https://example.com/onboardingUrl/');
$requestBody->setOnboardingStatus(new RemoteAssistanceOnboardingStatus('onboarding'));
$requestBody->setLastConnectionDateTime(new \DateTime('2016-12-31T23:58:36.6670033-08:00'));
$result = $graphServiceClient->deviceManagement()->remoteAssistancePartners()->byRemoteAssistancePartnerId('remoteAssistancePartner-id')->patch($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.DeviceManagement.Administration
$params = @{
"@odata.type" = "#microsoft.graph.remoteAssistancePartner"
displayName = "Display Name value"
onboardingUrl = "https://example.com/onboardingUrl/"
onboardingStatus = "onboarding"
lastConnectionDateTime = [System.DateTime]::Parse("2016-12-31T23:58:36.6670033-08:00")
}
Update-MgDeviceManagementRemoteAssistancePartner -RemoteAssistancePartnerId $remoteAssistancePartnerId -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.remote_assistance_partner import RemoteAssistancePartner
from msgraph.generated.models.remote_assistance_onboarding_status import RemoteAssistanceOnboardingStatus
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = RemoteAssistancePartner(
odata_type = "#microsoft.graph.remoteAssistancePartner",
display_name = "Display Name value",
onboarding_url = "https://example.com/onboardingUrl/",
onboarding_status = RemoteAssistanceOnboardingStatus.Onboarding,
last_connection_date_time = "2016-12-31T23:58:36.6670033-08:00",
)
result = await graph_client.device_management.remote_assistance_partners.by_remote_assistance_partner_id('remoteAssistancePartner-id').patch(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Antwort
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: 315
{
"@odata.type": "#microsoft.graph.remoteAssistancePartner",
"id": "7443c8b9-c8b9-7443-b9c8-4374b9c84374",
"displayName": "Display Name value",
"onboardingUrl": "https://example.com/onboardingUrl/",
"onboardingStatus": "onboarding",
"lastConnectionDateTime": "2016-12-31T23:58:36.6670033-08:00"
}