Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a windowsInformationProtectionAppLearningSummary object.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
✅ |
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) |
DeviceManagementApps.ReadWrite.All |
Delegated (personal Microsoft account) |
Not supported. |
Application |
DeviceManagementApps.ReadWrite.All |
HTTP Request
PATCH /deviceManagement/windowsInformationProtectionAppLearningSummaries/{windowsInformationProtectionAppLearningSummaryId}
Request body
In the request body, supply a JSON representation for the windowsInformationProtectionAppLearningSummary object.
The following table shows the properties that are required when you create the windowsInformationProtectionAppLearningSummary.
Property |
Type |
Description |
id |
String |
Unique Identifier for the WindowsInformationProtectionAppLearningSummary. |
applicationName |
String |
Application Name |
applicationType |
applicationType |
Application Type. Possible values are: universal , desktop . |
deviceCount |
Int32 |
Device Count |
Response
If successful, this method returns a 200 OK
response code and an updated windowsInformationProtectionAppLearningSummary object in the response body.
Example
Request
Here is an example of the request.
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);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
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\
}\
'
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// 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)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// 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);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
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);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?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();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
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
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# 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)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
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
}