Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Update the properties of a iosMobileAppConfiguration 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 /deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfigurationId}
Request body
In the request body, supply a JSON representation for the iosMobileAppConfiguration object.
The following table shows the properties that are required when you create the iosMobileAppConfiguration.
Response
If successful, this method returns a 200 OK
response code and an updated iosMobileAppConfiguration object in the response body.
Example
Request
Here is an example of the request.
PATCH https://graph.microsoft.com/v1.0/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfigurationId}
Content-type: application/json
Content-length: 534
{
"@odata.type": "#microsoft.graph.iosMobileAppConfiguration",
"targetedMobileApps": [
"Targeted Mobile Apps value"
],
"description": "Description value",
"displayName": "Display Name value",
"version": 7,
"encodedSettingXml": "ZW5jb2RlZFNldHRpbmdYbWw=",
"settings": [
{
"@odata.type": "microsoft.graph.appConfigurationSettingItem",
"appConfigKey": "App Config Key value",
"appConfigKeyType": "integerType",
"appConfigKeyValue": "App Config Key Value value"
}
]
}
// 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);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
mgc device-app-management mobile-app-configurations patch --managed-device-mobile-app-configuration-id {managedDeviceMobileAppConfiguration-id} --body '{\
"@odata.type": "#microsoft.graph.iosMobileAppConfiguration",\
"targetedMobileApps": [\
"Targeted Mobile Apps value"\
],\
"description": "Description value",\
"displayName": "Display Name value",\
"version": 7,\
"encodedSettingXml": "ZW5jb2RlZFNldHRpbmdYbWw=",\
"settings": [\
{\
"@odata.type": "microsoft.graph.appConfigurationSettingItem",\
"appConfigKey": "App Config Key value",\
"appConfigKeyType": "integerType",\
"appConfigKeyValue": "App Config Key Value value"\
}\
]\
}\
'
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.NewManagedDeviceMobileAppConfiguration()
targetedMobileApps := []string {
"Targeted Mobile Apps value",
}
requestBody.SetTargetedMobileApps(targetedMobileApps)
description := "Description value"
requestBody.SetDescription(&description)
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
version := int32(7)
requestBody.SetVersion(&version)
encodedSettingXml := []byte("zW5jb2RlZFNldHRpbmdYbWw=")
requestBody.SetEncodedSettingXml(&encodedSettingXml)
appConfigurationSettingItem := graphmodels.NewAppConfigurationSettingItem()
appConfigKey := "App Config Key value"
appConfigurationSettingItem.SetAppConfigKey(&appConfigKey)
appConfigKeyType := graphmodels.INTEGERTYPE_MDMAPPCONFIGKEYTYPE
appConfigurationSettingItem.SetAppConfigKeyType(&appConfigKeyType)
appConfigKeyValue := "App Config Key Value value"
appConfigurationSettingItem.SetAppConfigKeyValue(&appConfigKeyValue)
settings := []graphmodels.AppConfigurationSettingItemable {
appConfigurationSettingItem,
}
requestBody.SetSettings(settings)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
mobileAppConfigurations, err := graphClient.DeviceAppManagement().MobileAppConfigurations().ByManagedDeviceMobileAppConfigurationId("managedDeviceMobileAppConfiguration-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);
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);
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 managedDeviceMobileAppConfiguration = {
'@odata.type': '#microsoft.graph.iosMobileAppConfiguration',
targetedMobileApps: [
'Targeted Mobile Apps value'
],
description: 'Description value',
displayName: 'Display Name value',
version: 7,
encodedSettingXml: 'ZW5jb2RlZFNldHRpbmdYbWw=',
settings: [
{
'@odata.type': 'microsoft.graph.appConfigurationSettingItem',
appConfigKey: 'App Config Key value',
appConfigKeyType: 'integerType',
appConfigKeyValue: 'App Config Key Value value'
}
]
};
await client.api('/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfigurationId}')
.update(managedDeviceMobileAppConfiguration);
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\IosMobileAppConfiguration;
use Microsoft\Graph\Generated\Models\AppConfigurationSettingItem;
use Microsoft\Graph\Generated\Models\MdmAppConfigKeyType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new IosMobileAppConfiguration();
$requestBody->setOdataType('#microsoft.graph.iosMobileAppConfiguration');
$requestBody->setTargetedMobileApps(['Targeted Mobile Apps value', ]);
$requestBody->setDescription('Description value');
$requestBody->setDisplayName('Display Name value');
$requestBody->setVersion(7);
$requestBody->setEncodedSettingXml(\GuzzleHttp\Psr7\Utils::streamFor(base64_decode('ZW5jb2RlZFNldHRpbmdYbWw=')));
$settingsAppConfigurationSettingItem1 = new AppConfigurationSettingItem();
$settingsAppConfigurationSettingItem1->setOdataType('microsoft.graph.appConfigurationSettingItem');
$settingsAppConfigurationSettingItem1->setAppConfigKey('App Config Key value');
$settingsAppConfigurationSettingItem1->setAppConfigKeyType(new MdmAppConfigKeyType('integerType'));
$settingsAppConfigurationSettingItem1->setAppConfigKeyValue('App Config Key Value value');
$settingsArray []= $settingsAppConfigurationSettingItem1;
$requestBody->setSettings($settingsArray);
$result = $graphServiceClient->deviceAppManagement()->mobileAppConfigurations()->byManagedDeviceMobileAppConfigurationId('managedDeviceMobileAppConfiguration-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.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.iosMobileAppConfiguration"
targetedMobileApps = @(
"Targeted Mobile Apps value"
)
description = "Description value"
displayName = "Display Name value"
version = 7
encodedSettingXml = "ZW5jb2RlZFNldHRpbmdYbWw="
settings = @(
@{
"@odata.type" = "microsoft.graph.appConfigurationSettingItem"
appConfigKey = "App Config Key value"
appConfigKeyType = "integerType"
appConfigKeyValue = "App Config Key Value value"
}
)
}
Update-MgDeviceAppManagementMobileAppConfiguration -ManagedDeviceMobileAppConfigurationId $managedDeviceMobileAppConfigurationId -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.ios_mobile_app_configuration import IosMobileAppConfiguration
from msgraph.generated.models.app_configuration_setting_item import AppConfigurationSettingItem
from msgraph.generated.models.mdm_app_config_key_type import MdmAppConfigKeyType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = IosMobileAppConfiguration(
odata_type = "#microsoft.graph.iosMobileAppConfiguration",
targeted_mobile_apps = [
"Targeted Mobile Apps value",
],
description = "Description value",
display_name = "Display Name value",
version = 7,
encoded_setting_xml = base64.urlsafe_b64decode("ZW5jb2RlZFNldHRpbmdYbWw="),
settings = [
AppConfigurationSettingItem(
odata_type = "microsoft.graph.appConfigurationSettingItem",
app_config_key = "App Config Key value",
app_config_key_type = MdmAppConfigKeyType.IntegerType,
app_config_key_value = "App Config Key Value value",
),
],
)
result = await graph_client.device_app_management.mobile_app_configurations.by_managed_device_mobile_app_configuration_id('managedDeviceMobileAppConfiguration-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: 706
{
"@odata.type": "#microsoft.graph.iosMobileAppConfiguration",
"id": "b2c33191-3191-b2c3-9131-c3b29131c3b2",
"targetedMobileApps": [
"Targeted Mobile Apps value"
],
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"description": "Description value",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
"displayName": "Display Name value",
"version": 7,
"encodedSettingXml": "ZW5jb2RlZFNldHRpbmdYbWw=",
"settings": [
{
"@odata.type": "microsoft.graph.appConfigurationSettingItem",
"appConfigKey": "App Config Key value",
"appConfigKeyType": "integerType",
"appConfigKeyValue": "App Config Key Value value"
}
]
}