Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a windowsInformationProtectionNetworkLearningSummary 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/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummaryId}
Request body
In the request body, supply a JSON representation for the windowsInformationProtectionNetworkLearningSummary object.
The following table shows the properties that are required when you create the windowsInformationProtectionNetworkLearningSummary.
Property |
Type |
Description |
id |
String |
Unique Identifier for the WindowsInformationProtectionNetworkLearningSummary. |
url |
String |
Website url |
deviceCount |
Int32 |
Device Count |
Response
If successful, this method returns a 200 OK
response code and an updated windowsInformationProtectionNetworkLearningSummary object in the response body.
Example
Request
Here is an example of the request.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummaryId}
Content-type: application/json
Content-length: 137
{
"@odata.type": "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
"url": "Url value",
"deviceCount": 11
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new WindowsInformationProtectionNetworkLearningSummary
{
OdataType = "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
Url = "Url value",
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.WindowsInformationProtectionNetworkLearningSummaries["{windowsInformationProtectionNetworkLearningSummary-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-network-learning-summaries patch --windows-information-protection-network-learning-summary-id {windowsInformationProtectionNetworkLearningSummary-id} --body '{\
"@odata.type": "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",\
"url": "Url value",\
"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.NewWindowsInformationProtectionNetworkLearningSummary()
url := "Url value"
requestBody.SetUrl(&url)
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
windowsInformationProtectionNetworkLearningSummaries, err := graphClient.DeviceManagement().WindowsInformationProtectionNetworkLearningSummaries().ByWindowsInformationProtectionNetworkLearningSummaryId("windowsInformationProtectionNetworkLearningSummary-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);
WindowsInformationProtectionNetworkLearningSummary windowsInformationProtectionNetworkLearningSummary = new WindowsInformationProtectionNetworkLearningSummary();
windowsInformationProtectionNetworkLearningSummary.setOdataType("#microsoft.graph.windowsInformationProtectionNetworkLearningSummary");
windowsInformationProtectionNetworkLearningSummary.setUrl("Url value");
windowsInformationProtectionNetworkLearningSummary.setDeviceCount(11);
WindowsInformationProtectionNetworkLearningSummary result = graphClient.deviceManagement().windowsInformationProtectionNetworkLearningSummaries().byWindowsInformationProtectionNetworkLearningSummaryId("{windowsInformationProtectionNetworkLearningSummary-id}").patch(windowsInformationProtectionNetworkLearningSummary);
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 windowsInformationProtectionNetworkLearningSummary = {
'@odata.type': '#microsoft.graph.windowsInformationProtectionNetworkLearningSummary',
url: 'Url value',
deviceCount: 11
};
await client.api('/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummaryId}')
.update(windowsInformationProtectionNetworkLearningSummary);
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\WindowsInformationProtectionNetworkLearningSummary;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new WindowsInformationProtectionNetworkLearningSummary();
$requestBody->setOdataType('#microsoft.graph.windowsInformationProtectionNetworkLearningSummary');
$requestBody->setUrl('Url value');
$requestBody->setDeviceCount(11);
$result = $graphServiceClient->deviceManagement()->windowsInformationProtectionNetworkLearningSummaries()->byWindowsInformationProtectionNetworkLearningSummaryId('windowsInformationProtectionNetworkLearningSummary-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.windowsInformationProtectionNetworkLearningSummary"
url = "Url value"
deviceCount = 11
}
Update-MgDeviceManagementWindowsInformationProtectionNetworkLearningSummary -WindowsInformationProtectionNetworkLearningSummaryId $windowsInformationProtectionNetworkLearningSummaryId -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_network_learning_summary import WindowsInformationProtectionNetworkLearningSummary
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WindowsInformationProtectionNetworkLearningSummary(
odata_type = "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
url = "Url value",
device_count = 11,
)
result = await graph_client.device_management.windows_information_protection_network_learning_summaries.by_windows_information_protection_network_learning_summary_id('windowsInformationProtectionNetworkLearningSummary-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: 186
{
"@odata.type": "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
"id": "242108f7-08f7-2421-f708-2124f7082124",
"url": "Url value",
"deviceCount": 11
}