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 windowsInformationProtectionAppLearningSummary-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) |
DeviceManagementApps.ReadWrite.All |
Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Anwendung |
DeviceManagementApps.ReadWrite.All |
HTTP-Anforderung
PATCH /deviceManagement/windowsInformationProtectionAppLearningSummaries/{windowsInformationProtectionAppLearningSummaryId}
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung des windowsInformationProtectionAppLearningSummary-Objekts an.
In der folgenden Tabelle sind die Eigenschaften dargestellt, die zum Erstellen der windowsInformationProtectionAppLearningSummary erforderlich sind.
Eigenschaft |
Typ |
Beschreibung |
id |
String |
Eindeutiger Bezeichner für die WindowsInformationProtectionAppLearningSummary. |
applicationName |
String |
Name der Anwendung |
applicationType |
applicationType |
Anwendungstyp. Mögliche Werte sind: universal und desktop . |
deviceCount |
Int32 |
Geräteanzahl |
Antwort
Wenn erfolgreich, gibt diese Methode den 200 OK
-Antwortcode und das aktualisierte windowsInformationProtectionAppLearningSummary-Objekt im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/windowsInformationProtectionAppLearningSummaries/{windowsInformationProtectionAppLearningSummaryId}
Content-type: application/json
Content-length: 191
{
"@odata.type": "#microsoft.graph.windowsInformationProtectionAppLearningSummary",
"applicationName": "Application Name value",
"applicationType": "desktop",
"deviceCount": 11
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new WindowsInformationProtectionAppLearningSummary
{
OdataType = "#microsoft.graph.windowsInformationProtectionAppLearningSummary",
ApplicationName = "Application Name value",
ApplicationType = ApplicationType.Desktop,
DeviceCount = 11,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.WindowsInformationProtectionAppLearningSummaries["{windowsInformationProtectionAppLearningSummary-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 windows-information-protection-app-learning-summaries patch --windows-information-protection-app-learning-summary-id {windowsInformationProtectionAppLearningSummary-id} --body '{\
"@odata.type": "#microsoft.graph.windowsInformationProtectionAppLearningSummary",\
"applicationName": "Application Name value",\
"applicationType": "desktop",\
"deviceCount": 11\
}\
'
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"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewWindowsInformationProtectionAppLearningSummary()
applicationName := "Application Name value"
requestBody.SetApplicationName(&applicationName)
applicationType := graphmodels.DESKTOP_APPLICATIONTYPE
requestBody.SetApplicationType(&applicationType)
deviceCount := int32(11)
requestBody.SetDeviceCount(&deviceCount)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
windowsInformationProtectionAppLearningSummaries, err := graphClient.DeviceManagement().WindowsInformationProtectionAppLearningSummaries().ByWindowsInformationProtectionAppLearningSummaryId("windowsInformationProtectionAppLearningSummary-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);
WindowsInformationProtectionAppLearningSummary windowsInformationProtectionAppLearningSummary = new WindowsInformationProtectionAppLearningSummary();
windowsInformationProtectionAppLearningSummary.setOdataType("#microsoft.graph.windowsInformationProtectionAppLearningSummary");
windowsInformationProtectionAppLearningSummary.setApplicationName("Application Name value");
windowsInformationProtectionAppLearningSummary.setApplicationType(ApplicationType.Desktop);
windowsInformationProtectionAppLearningSummary.setDeviceCount(11);
WindowsInformationProtectionAppLearningSummary result = graphClient.deviceManagement().windowsInformationProtectionAppLearningSummaries().byWindowsInformationProtectionAppLearningSummaryId("{windowsInformationProtectionAppLearningSummary-id}").patch(windowsInformationProtectionAppLearningSummary);
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 windowsInformationProtectionAppLearningSummary = {
'@odata.type': '#microsoft.graph.windowsInformationProtectionAppLearningSummary',
applicationName: 'Application Name value',
applicationType: 'desktop',
deviceCount: 11
};
await client.api('/deviceManagement/windowsInformationProtectionAppLearningSummaries/{windowsInformationProtectionAppLearningSummaryId}')
.update(windowsInformationProtectionAppLearningSummary);
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\WindowsInformationProtectionAppLearningSummary;
use Microsoft\Graph\Generated\Models\ApplicationType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new WindowsInformationProtectionAppLearningSummary();
$requestBody->setOdataType('#microsoft.graph.windowsInformationProtectionAppLearningSummary');
$requestBody->setApplicationName('Application Name value');
$requestBody->setApplicationType(new ApplicationType('desktop'));
$requestBody->setDeviceCount(11);
$result = $graphServiceClient->deviceManagement()->windowsInformationProtectionAppLearningSummaries()->byWindowsInformationProtectionAppLearningSummaryId('windowsInformationProtectionAppLearningSummary-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
$params = @{
"@odata.type" = "#microsoft.graph.windowsInformationProtectionAppLearningSummary"
applicationName = "Application Name value"
applicationType = "desktop"
deviceCount = 11
}
Update-MgDeviceManagementWindowsInformationProtectionAppLearningSummary -WindowsInformationProtectionAppLearningSummaryId $windowsInformationProtectionAppLearningSummaryId -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.windows_information_protection_app_learning_summary import WindowsInformationProtectionAppLearningSummary
from msgraph.generated.models.application_type import ApplicationType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WindowsInformationProtectionAppLearningSummary(
odata_type = "#microsoft.graph.windowsInformationProtectionAppLearningSummary",
application_name = "Application Name value",
application_type = ApplicationType.Desktop,
device_count = 11,
)
result = await graph_client.device_management.windows_information_protection_app_learning_summaries.by_windows_information_protection_app_learning_summary_id('windowsInformationProtectionAppLearningSummary-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: 240
{
"@odata.type": "#microsoft.graph.windowsInformationProtectionAppLearningSummary",
"id": "063baf50-af50-063b-50af-3b0650af3b06",
"applicationName": "Application Name value",
"applicationType": "desktop",
"deviceCount": 11
}