// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ManagedAppPolicyDeploymentSummary
{
OdataType = "#microsoft.graph.managedAppPolicyDeploymentSummary",
DisplayName = "Display Name value",
ConfigurationDeployedUserCount = 14,
LastRefreshTime = DateTimeOffset.Parse("2017-01-01T00:01:30.1240368-08:00"),
ConfigurationDeploymentSummaryPerApp = new List<ManagedAppPolicyDeploymentSummaryPerApp>
{
new ManagedAppPolicyDeploymentSummaryPerApp
{
OdataType = "microsoft.graph.managedAppPolicyDeploymentSummaryPerApp",
MobileAppIdentifier = new AndroidMobileAppIdentifier
{
OdataType = "microsoft.graph.androidMobileAppIdentifier",
PackageId = "Package Id value",
},
ConfigurationAppliedUserCount = 13,
},
},
Version = "Version value",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceAppManagement.IosManagedAppProtections["{iosManagedAppProtection-id}"].DeploymentSummary.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
ManagedAppPolicyDeploymentSummary managedAppPolicyDeploymentSummary = new ManagedAppPolicyDeploymentSummary();
managedAppPolicyDeploymentSummary.setOdataType("#microsoft.graph.managedAppPolicyDeploymentSummary");
managedAppPolicyDeploymentSummary.setDisplayName("Display Name value");
managedAppPolicyDeploymentSummary.setConfigurationDeployedUserCount(14);
OffsetDateTime lastRefreshTime = OffsetDateTime.parse("2017-01-01T00:01:30.1240368-08:00");
managedAppPolicyDeploymentSummary.setLastRefreshTime(lastRefreshTime);
LinkedList<ManagedAppPolicyDeploymentSummaryPerApp> configurationDeploymentSummaryPerApp = new LinkedList<ManagedAppPolicyDeploymentSummaryPerApp>();
ManagedAppPolicyDeploymentSummaryPerApp managedAppPolicyDeploymentSummaryPerApp = new ManagedAppPolicyDeploymentSummaryPerApp();
managedAppPolicyDeploymentSummaryPerApp.setOdataType("microsoft.graph.managedAppPolicyDeploymentSummaryPerApp");
AndroidMobileAppIdentifier mobileAppIdentifier = new AndroidMobileAppIdentifier();
mobileAppIdentifier.setOdataType("microsoft.graph.androidMobileAppIdentifier");
mobileAppIdentifier.setPackageId("Package Id value");
managedAppPolicyDeploymentSummaryPerApp.setMobileAppIdentifier(mobileAppIdentifier);
managedAppPolicyDeploymentSummaryPerApp.setConfigurationAppliedUserCount(13);
configurationDeploymentSummaryPerApp.add(managedAppPolicyDeploymentSummaryPerApp);
managedAppPolicyDeploymentSummary.setConfigurationDeploymentSummaryPerApp(configurationDeploymentSummaryPerApp);
managedAppPolicyDeploymentSummary.setVersion("Version value");
ManagedAppPolicyDeploymentSummary result = graphClient.deviceAppManagement().iosManagedAppProtections().byIosManagedAppProtectionId("{iosManagedAppProtection-id}").deploymentSummary().patch(managedAppPolicyDeploymentSummary);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\ManagedAppPolicyDeploymentSummary;
use Microsoft\Graph\Generated\Models\ManagedAppPolicyDeploymentSummaryPerApp;
use Microsoft\Graph\Generated\Models\AndroidMobileAppIdentifier;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ManagedAppPolicyDeploymentSummary();
$requestBody->setOdataType('#microsoft.graph.managedAppPolicyDeploymentSummary');
$requestBody->setDisplayName('Display Name value');
$requestBody->setConfigurationDeployedUserCount(14);
$requestBody->setLastRefreshTime(new \DateTime('2017-01-01T00:01:30.1240368-08:00'));
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1 = new ManagedAppPolicyDeploymentSummaryPerApp();
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1->setOdataType('microsoft.graph.managedAppPolicyDeploymentSummaryPerApp');
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1MobileAppIdentifier = new AndroidMobileAppIdentifier();
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1MobileAppIdentifier->setOdataType('microsoft.graph.androidMobileAppIdentifier');
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1MobileAppIdentifier->setPackageId('Package Id value');
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1->setMobileAppIdentifier($configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1MobileAppIdentifier);
$configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1->setConfigurationAppliedUserCount(13);
$configurationDeploymentSummaryPerAppArray []= $configurationDeploymentSummaryPerAppManagedAppPolicyDeploymentSummaryPerApp1;
$requestBody->setConfigurationDeploymentSummaryPerApp($configurationDeploymentSummaryPerAppArray);
$requestBody->setVersion('Version value');
$result = $graphServiceClient->deviceAppManagement()->iosManagedAppProtections()->byIosManagedAppProtectionId('iosManagedAppProtection-id')->deploymentSummary()->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.managed_app_policy_deployment_summary import ManagedAppPolicyDeploymentSummary
from msgraph.generated.models.managed_app_policy_deployment_summary_per_app import ManagedAppPolicyDeploymentSummaryPerApp
from msgraph.generated.models.android_mobile_app_identifier import AndroidMobileAppIdentifier
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ManagedAppPolicyDeploymentSummary(
odata_type = "#microsoft.graph.managedAppPolicyDeploymentSummary",
display_name = "Display Name value",
configuration_deployed_user_count = 14,
last_refresh_time = "2017-01-01T00:01:30.1240368-08:00",
configuration_deployment_summary_per_app = [
ManagedAppPolicyDeploymentSummaryPerApp(
odata_type = "microsoft.graph.managedAppPolicyDeploymentSummaryPerApp",
mobile_app_identifier = AndroidMobileAppIdentifier(
odata_type = "microsoft.graph.androidMobileAppIdentifier",
package_id = "Package Id value",
),
configuration_applied_user_count = 13,
),
],
version = "Version value",
)
result = await graph_client.device_app_management.ios_managed_app_protections.by_ios_managed_app_protection_id('iosManagedAppProtection-id').deployment_summary.patch(request_body)
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.