A set of string key and string value pairs to be sent to apps for users to whom the configuration is scoped, unalterned by this service Inherited from managedAppConfiguration
deployedAppCount
Int32
Count of apps to which the current policy is deployed.
isAssigned
Boolean
Indicates if the policy is deployed to any inclusion groups or not.
Response
If successful, this method returns a 201 Created response code and a targetedManagedAppConfiguration object in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TargetedManagedAppConfiguration
{
OdataType = "#microsoft.graph.targetedManagedAppConfiguration",
DisplayName = "Display Name value",
Description = "Description value",
Version = "Version value",
CustomSettings = new List<KeyValuePair>
{
new KeyValuePair
{
OdataType = "microsoft.graph.keyValuePair",
Name = "Name value",
Value = "Value value",
},
},
DeployedAppCount = 0,
IsAssigned = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceAppManagement.TargetedManagedAppConfigurations.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
TargetedManagedAppConfiguration targetedManagedAppConfiguration = new TargetedManagedAppConfiguration();
targetedManagedAppConfiguration.setOdataType("#microsoft.graph.targetedManagedAppConfiguration");
targetedManagedAppConfiguration.setDisplayName("Display Name value");
targetedManagedAppConfiguration.setDescription("Description value");
targetedManagedAppConfiguration.setVersion("Version value");
LinkedList<KeyValuePair> customSettings = new LinkedList<KeyValuePair>();
KeyValuePair keyValuePair = new KeyValuePair();
keyValuePair.setOdataType("microsoft.graph.keyValuePair");
keyValuePair.setName("Name value");
keyValuePair.setValue("Value value");
customSettings.add(keyValuePair);
targetedManagedAppConfiguration.setCustomSettings(customSettings);
targetedManagedAppConfiguration.setDeployedAppCount(0);
targetedManagedAppConfiguration.setIsAssigned(true);
TargetedManagedAppConfiguration result = graphClient.deviceAppManagement().targetedManagedAppConfigurations().post(targetedManagedAppConfiguration);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.targeted_managed_app_configuration import TargetedManagedAppConfiguration
from msgraph.generated.models.key_value_pair import KeyValuePair
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = TargetedManagedAppConfiguration(
odata_type = "#microsoft.graph.targetedManagedAppConfiguration",
display_name = "Display Name value",
description = "Description value",
version = "Version value",
custom_settings = [
KeyValuePair(
odata_type = "microsoft.graph.keyValuePair",
name = "Name value",
value = "Value value",
),
],
deployed_app_count = 0,
is_assigned = True,
)
result = await graph_client.device_app_management.targeted_managed_app_configurations.post(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.