L’une des autorisations suivantes est nécessaire pour appeler cette API. Pour plus d’informations, notamment sur la façon de choisir les autorisations, voir Autorisations.
Type d’autorisation
Autorisations (de celle qui offre le plus de privilèges à celle qui en offre le moins)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new IosMobileAppConfiguration
{
OdataType = "#microsoft.graph.iosMobileAppConfiguration",
TargetedMobileApps = new List<string>
{
"Targeted Mobile Apps value",
},
Description = "Description value",
DisplayName = "Display Name value",
Version = 7,
EncodedSettingXml = Convert.FromBase64String("ZW5jb2RlZFNldHRpbmdYbWw="),
Settings = new List<AppConfigurationSettingItem>
{
new AppConfigurationSettingItem
{
OdataType = "microsoft.graph.appConfigurationSettingItem",
AppConfigKey = "App Config Key value",
AppConfigKeyType = MdmAppConfigKeyType.IntegerType,
AppConfigKeyValue = "App Config Key Value 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.MobileAppConfigurations["{managedDeviceMobileAppConfiguration-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
IosMobileAppConfiguration managedDeviceMobileAppConfiguration = new IosMobileAppConfiguration();
managedDeviceMobileAppConfiguration.setOdataType("#microsoft.graph.iosMobileAppConfiguration");
LinkedList<String> targetedMobileApps = new LinkedList<String>();
targetedMobileApps.add("Targeted Mobile Apps value");
managedDeviceMobileAppConfiguration.setTargetedMobileApps(targetedMobileApps);
managedDeviceMobileAppConfiguration.setDescription("Description value");
managedDeviceMobileAppConfiguration.setDisplayName("Display Name value");
managedDeviceMobileAppConfiguration.setVersion(7);
byte[] encodedSettingXml = Base64.getDecoder().decode("ZW5jb2RlZFNldHRpbmdYbWw=");
managedDeviceMobileAppConfiguration.setEncodedSettingXml(encodedSettingXml);
LinkedList<AppConfigurationSettingItem> settings = new LinkedList<AppConfigurationSettingItem>();
AppConfigurationSettingItem appConfigurationSettingItem = new AppConfigurationSettingItem();
appConfigurationSettingItem.setOdataType("microsoft.graph.appConfigurationSettingItem");
appConfigurationSettingItem.setAppConfigKey("App Config Key value");
appConfigurationSettingItem.setAppConfigKeyType(MdmAppConfigKeyType.IntegerType);
appConfigurationSettingItem.setAppConfigKeyValue("App Config Key Value value");
settings.add(appConfigurationSettingItem);
managedDeviceMobileAppConfiguration.setSettings(settings);
ManagedDeviceMobileAppConfiguration result = graphClient.deviceAppManagement().mobileAppConfigurations().byManagedDeviceMobileAppConfigurationId("{managedDeviceMobileAppConfiguration-id}").patch(managedDeviceMobileAppConfiguration);
Voici un exemple de réponse. Remarque : l’objet de réponse illustré ici peut être tronqué à des fins de concision. Toutes les propriétés sont renvoyées à partir d’un appel réel.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez https://aka.ms/ContentUserFeedback.