// 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://video2.skills-academy.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();