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.
Dans le corps de la demande, fournissez une représentation JSON pour l’objet iosManagedAppProtection.
Le tableau suivant indique les propriétés qui sont requises lorsque vous créez l’objet iosManagedAppProtection.
Voici un exemple de demande.
POST https://graph.microsoft.com/v1.0/deviceAppManagement/iosManagedAppProtections
Content-type: application/json
Content-length: 1667
{
"@odata.type": "#microsoft.graph.iosManagedAppProtection",
"displayName": "Display Name value",
"description": "Description value",
"version": "Version value",
"periodOfflineBeforeAccessCheck": "-PT17.1357909S",
"periodOnlineBeforeAccessCheck": "PT35.0018757S",
"allowedInboundDataTransferSources": "managedApps",
"allowedOutboundDataTransferDestinations": "managedApps",
"organizationalCredentialsRequired": true,
"allowedOutboundClipboardSharingLevel": "managedAppsWithPasteIn",
"dataBackupBlocked": true,
"deviceComplianceRequired": true,
"managedBrowserToOpenLinksRequired": true,
"saveAsBlocked": true,
"periodOfflineBeforeWipeIsEnforced": "-PT3M22.1587532S",
"pinRequired": true,
"maximumPinRetries": 1,
"simplePinBlocked": true,
"minimumPinLength": 0,
"pinCharacterSet": "alphanumericAndSymbol",
"periodBeforePinReset": "PT3M29.6631862S",
"allowedDataStorageLocations": [
"sharePoint"
],
"contactSyncBlocked": true,
"printBlocked": true,
"fingerprintBlocked": true,
"disableAppPinIfDevicePinIsSet": true,
"minimumRequiredOsVersion": "Minimum Required Os Version value",
"minimumWarningOsVersion": "Minimum Warning Os Version value",
"minimumRequiredAppVersion": "Minimum Required App Version value",
"minimumWarningAppVersion": "Minimum Warning App Version value",
"managedBrowser": "microsoftEdge",
"isAssigned": true,
"appDataEncryptionType": "afterDeviceRestart",
"minimumRequiredSdkVersion": "Minimum Required Sdk Version value",
"deployedAppCount": 0,
"faceIdBlocked": true,
"customBrowserProtocol": "Custom Browser Protocol value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new IosManagedAppProtection
{
OdataType = "#microsoft.graph.iosManagedAppProtection",
DisplayName = "Display Name value",
Description = "Description value",
Version = "Version value",
PeriodOfflineBeforeAccessCheck = TimeSpan.Parse("-PT17.1357909S"),
PeriodOnlineBeforeAccessCheck = TimeSpan.Parse("PT35.0018757S"),
AllowedInboundDataTransferSources = ManagedAppDataTransferLevel.ManagedApps,
AllowedOutboundDataTransferDestinations = ManagedAppDataTransferLevel.ManagedApps,
OrganizationalCredentialsRequired = true,
AllowedOutboundClipboardSharingLevel = ManagedAppClipboardSharingLevel.ManagedAppsWithPasteIn,
DataBackupBlocked = true,
DeviceComplianceRequired = true,
ManagedBrowserToOpenLinksRequired = true,
SaveAsBlocked = true,
PeriodOfflineBeforeWipeIsEnforced = TimeSpan.Parse("-PT3M22.1587532S"),
PinRequired = true,
MaximumPinRetries = 1,
SimplePinBlocked = true,
MinimumPinLength = 0,
PinCharacterSet = ManagedAppPinCharacterSet.AlphanumericAndSymbol,
PeriodBeforePinReset = TimeSpan.Parse("PT3M29.6631862S"),
AllowedDataStorageLocations = new List<ManagedAppDataStorageLocation?>
{
ManagedAppDataStorageLocation.SharePoint,
},
ContactSyncBlocked = true,
PrintBlocked = true,
FingerprintBlocked = true,
DisableAppPinIfDevicePinIsSet = true,
MinimumRequiredOsVersion = "Minimum Required Os Version value",
MinimumWarningOsVersion = "Minimum Warning Os Version value",
MinimumRequiredAppVersion = "Minimum Required App Version value",
MinimumWarningAppVersion = "Minimum Warning App Version value",
ManagedBrowser = ManagedBrowserType.MicrosoftEdge,
IsAssigned = true,
AppDataEncryptionType = ManagedAppDataEncryptionType.AfterDeviceRestart,
MinimumRequiredSdkVersion = "Minimum Required Sdk Version value",
DeployedAppCount = 0,
FaceIdBlocked = true,
CustomBrowserProtocol = "Custom Browser Protocol 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.PostAsync(requestBody);
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
mgc device-app-management ios-managed-app-protections create --body '{\
"@odata.type": "#microsoft.graph.iosManagedAppProtection",\
"displayName": "Display Name value",\
"description": "Description value",\
"version": "Version value",\
"periodOfflineBeforeAccessCheck": "-PT17.1357909S",\
"periodOnlineBeforeAccessCheck": "PT35.0018757S",\
"allowedInboundDataTransferSources": "managedApps",\
"allowedOutboundDataTransferDestinations": "managedApps",\
"organizationalCredentialsRequired": true,\
"allowedOutboundClipboardSharingLevel": "managedAppsWithPasteIn",\
"dataBackupBlocked": true,\
"deviceComplianceRequired": true,\
"managedBrowserToOpenLinksRequired": true,\
"saveAsBlocked": true,\
"periodOfflineBeforeWipeIsEnforced": "-PT3M22.1587532S",\
"pinRequired": true,\
"maximumPinRetries": 1,\
"simplePinBlocked": true,\
"minimumPinLength": 0,\
"pinCharacterSet": "alphanumericAndSymbol",\
"periodBeforePinReset": "PT3M29.6631862S",\
"allowedDataStorageLocations": [\
"sharePoint"\
],\
"contactSyncBlocked": true,\
"printBlocked": true,\
"fingerprintBlocked": true,\
"disableAppPinIfDevicePinIsSet": true,\
"minimumRequiredOsVersion": "Minimum Required Os Version value",\
"minimumWarningOsVersion": "Minimum Warning Os Version value",\
"minimumRequiredAppVersion": "Minimum Required App Version value",\
"minimumWarningAppVersion": "Minimum Warning App Version value",\
"managedBrowser": "microsoftEdge",\
"isAssigned": true,\
"appDataEncryptionType": "afterDeviceRestart",\
"minimumRequiredSdkVersion": "Minimum Required Sdk Version value",\
"deployedAppCount": 0,\
"faceIdBlocked": true,\
"customBrowserProtocol": "Custom Browser Protocol value"\
}\
'
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
abstractions "github.com/microsoft/kiota-abstractions-go"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewIosManagedAppProtection()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
description := "Description value"
requestBody.SetDescription(&description)
version := "Version value"
requestBody.SetVersion(&version)
periodOfflineBeforeAccessCheck , err := abstractions.ParseISODuration("-PT17.1357909S")
requestBody.SetPeriodOfflineBeforeAccessCheck(&periodOfflineBeforeAccessCheck)
periodOnlineBeforeAccessCheck , err := abstractions.ParseISODuration("PT35.0018757S")
requestBody.SetPeriodOnlineBeforeAccessCheck(&periodOnlineBeforeAccessCheck)
allowedInboundDataTransferSources := graphmodels.MANAGEDAPPS_MANAGEDAPPDATATRANSFERLEVEL
requestBody.SetAllowedInboundDataTransferSources(&allowedInboundDataTransferSources)
allowedOutboundDataTransferDestinations := graphmodels.MANAGEDAPPS_MANAGEDAPPDATATRANSFERLEVEL
requestBody.SetAllowedOutboundDataTransferDestinations(&allowedOutboundDataTransferDestinations)
organizationalCredentialsRequired := true
requestBody.SetOrganizationalCredentialsRequired(&organizationalCredentialsRequired)
allowedOutboundClipboardSharingLevel := graphmodels.MANAGEDAPPSWITHPASTEIN_MANAGEDAPPCLIPBOARDSHARINGLEVEL
requestBody.SetAllowedOutboundClipboardSharingLevel(&allowedOutboundClipboardSharingLevel)
dataBackupBlocked := true
requestBody.SetDataBackupBlocked(&dataBackupBlocked)
deviceComplianceRequired := true
requestBody.SetDeviceComplianceRequired(&deviceComplianceRequired)
managedBrowserToOpenLinksRequired := true
requestBody.SetManagedBrowserToOpenLinksRequired(&managedBrowserToOpenLinksRequired)
saveAsBlocked := true
requestBody.SetSaveAsBlocked(&saveAsBlocked)
periodOfflineBeforeWipeIsEnforced , err := abstractions.ParseISODuration("-PT3M22.1587532S")
requestBody.SetPeriodOfflineBeforeWipeIsEnforced(&periodOfflineBeforeWipeIsEnforced)
pinRequired := true
requestBody.SetPinRequired(&pinRequired)
maximumPinRetries := int32(1)
requestBody.SetMaximumPinRetries(&maximumPinRetries)
simplePinBlocked := true
requestBody.SetSimplePinBlocked(&simplePinBlocked)
minimumPinLength := int32(0)
requestBody.SetMinimumPinLength(&minimumPinLength)
pinCharacterSet := graphmodels.ALPHANUMERICANDSYMBOL_MANAGEDAPPPINCHARACTERSET
requestBody.SetPinCharacterSet(&pinCharacterSet)
periodBeforePinReset , err := abstractions.ParseISODuration("PT3M29.6631862S")
requestBody.SetPeriodBeforePinReset(&periodBeforePinReset)
allowedDataStorageLocations := []graphmodels.ManagedAppDataStorageLocationable {
managedAppDataStorageLocation := graphmodels.SHAREPOINT_MANAGEDAPPDATASTORAGELOCATION
requestBody.SetManagedAppDataStorageLocation(&managedAppDataStorageLocation)
}
requestBody.SetAllowedDataStorageLocations(allowedDataStorageLocations)
contactSyncBlocked := true
requestBody.SetContactSyncBlocked(&contactSyncBlocked)
printBlocked := true
requestBody.SetPrintBlocked(&printBlocked)
fingerprintBlocked := true
requestBody.SetFingerprintBlocked(&fingerprintBlocked)
disableAppPinIfDevicePinIsSet := true
requestBody.SetDisableAppPinIfDevicePinIsSet(&disableAppPinIfDevicePinIsSet)
minimumRequiredOsVersion := "Minimum Required Os Version value"
requestBody.SetMinimumRequiredOsVersion(&minimumRequiredOsVersion)
minimumWarningOsVersion := "Minimum Warning Os Version value"
requestBody.SetMinimumWarningOsVersion(&minimumWarningOsVersion)
minimumRequiredAppVersion := "Minimum Required App Version value"
requestBody.SetMinimumRequiredAppVersion(&minimumRequiredAppVersion)
minimumWarningAppVersion := "Minimum Warning App Version value"
requestBody.SetMinimumWarningAppVersion(&minimumWarningAppVersion)
managedBrowser := graphmodels.MICROSOFTEDGE_MANAGEDBROWSERTYPE
requestBody.SetManagedBrowser(&managedBrowser)
isAssigned := true
requestBody.SetIsAssigned(&isAssigned)
appDataEncryptionType := graphmodels.AFTERDEVICERESTART_MANAGEDAPPDATAENCRYPTIONTYPE
requestBody.SetAppDataEncryptionType(&appDataEncryptionType)
minimumRequiredSdkVersion := "Minimum Required Sdk Version value"
requestBody.SetMinimumRequiredSdkVersion(&minimumRequiredSdkVersion)
deployedAppCount := int32(0)
requestBody.SetDeployedAppCount(&deployedAppCount)
faceIdBlocked := true
requestBody.SetFaceIdBlocked(&faceIdBlocked)
customBrowserProtocol := "Custom Browser Protocol value"
requestBody.SetCustomBrowserProtocol(&customBrowserProtocol)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
iosManagedAppProtections, err := graphClient.DeviceAppManagement().IosManagedAppProtections().Post(context.Background(), requestBody, nil)
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
IosManagedAppProtection iosManagedAppProtection = new IosManagedAppProtection();
iosManagedAppProtection.setOdataType("#microsoft.graph.iosManagedAppProtection");
iosManagedAppProtection.setDisplayName("Display Name value");
iosManagedAppProtection.setDescription("Description value");
iosManagedAppProtection.setVersion("Version value");
PeriodAndDuration periodOfflineBeforeAccessCheck = PeriodAndDuration.ofDuration(Duration.parse("-PT17.1357909S"));
iosManagedAppProtection.setPeriodOfflineBeforeAccessCheck(periodOfflineBeforeAccessCheck);
PeriodAndDuration periodOnlineBeforeAccessCheck = PeriodAndDuration.ofDuration(Duration.parse("PT35.0018757S"));
iosManagedAppProtection.setPeriodOnlineBeforeAccessCheck(periodOnlineBeforeAccessCheck);
iosManagedAppProtection.setAllowedInboundDataTransferSources(ManagedAppDataTransferLevel.ManagedApps);
iosManagedAppProtection.setAllowedOutboundDataTransferDestinations(ManagedAppDataTransferLevel.ManagedApps);
iosManagedAppProtection.setOrganizationalCredentialsRequired(true);
iosManagedAppProtection.setAllowedOutboundClipboardSharingLevel(ManagedAppClipboardSharingLevel.ManagedAppsWithPasteIn);
iosManagedAppProtection.setDataBackupBlocked(true);
iosManagedAppProtection.setDeviceComplianceRequired(true);
iosManagedAppProtection.setManagedBrowserToOpenLinksRequired(true);
iosManagedAppProtection.setSaveAsBlocked(true);
PeriodAndDuration periodOfflineBeforeWipeIsEnforced = PeriodAndDuration.ofDuration(Duration.parse("-PT3M22.1587532S"));
iosManagedAppProtection.setPeriodOfflineBeforeWipeIsEnforced(periodOfflineBeforeWipeIsEnforced);
iosManagedAppProtection.setPinRequired(true);
iosManagedAppProtection.setMaximumPinRetries(1);
iosManagedAppProtection.setSimplePinBlocked(true);
iosManagedAppProtection.setMinimumPinLength(0);
iosManagedAppProtection.setPinCharacterSet(ManagedAppPinCharacterSet.AlphanumericAndSymbol);
PeriodAndDuration periodBeforePinReset = PeriodAndDuration.ofDuration(Duration.parse("PT3M29.6631862S"));
iosManagedAppProtection.setPeriodBeforePinReset(periodBeforePinReset);
LinkedList<ManagedAppDataStorageLocation> allowedDataStorageLocations = new LinkedList<ManagedAppDataStorageLocation>();
allowedDataStorageLocations.add(ManagedAppDataStorageLocation.SharePoint);
iosManagedAppProtection.setAllowedDataStorageLocations(allowedDataStorageLocations);
iosManagedAppProtection.setContactSyncBlocked(true);
iosManagedAppProtection.setPrintBlocked(true);
iosManagedAppProtection.setFingerprintBlocked(true);
iosManagedAppProtection.setDisableAppPinIfDevicePinIsSet(true);
iosManagedAppProtection.setMinimumRequiredOsVersion("Minimum Required Os Version value");
iosManagedAppProtection.setMinimumWarningOsVersion("Minimum Warning Os Version value");
iosManagedAppProtection.setMinimumRequiredAppVersion("Minimum Required App Version value");
iosManagedAppProtection.setMinimumWarningAppVersion("Minimum Warning App Version value");
iosManagedAppProtection.setManagedBrowser(EnumSet.of(ManagedBrowserType.MicrosoftEdge));
iosManagedAppProtection.setIsAssigned(true);
iosManagedAppProtection.setAppDataEncryptionType(ManagedAppDataEncryptionType.AfterDeviceRestart);
iosManagedAppProtection.setMinimumRequiredSdkVersion("Minimum Required Sdk Version value");
iosManagedAppProtection.setDeployedAppCount(0);
iosManagedAppProtection.setFaceIdBlocked(true);
iosManagedAppProtection.setCustomBrowserProtocol("Custom Browser Protocol value");
IosManagedAppProtection result = graphClient.deviceAppManagement().iosManagedAppProtections().post(iosManagedAppProtection);
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
const options = {
authProvider,
};
const client = Client.init(options);
const iosManagedAppProtection = {
'@odata.type': '#microsoft.graph.iosManagedAppProtection',
displayName: 'Display Name value',
description: 'Description value',
version: 'Version value',
periodOfflineBeforeAccessCheck: '-PT17.1357909S',
periodOnlineBeforeAccessCheck: 'PT35.0018757S',
allowedInboundDataTransferSources: 'managedApps',
allowedOutboundDataTransferDestinations: 'managedApps',
organizationalCredentialsRequired: true,
allowedOutboundClipboardSharingLevel: 'managedAppsWithPasteIn',
dataBackupBlocked: true,
deviceComplianceRequired: true,
managedBrowserToOpenLinksRequired: true,
saveAsBlocked: true,
periodOfflineBeforeWipeIsEnforced: '-PT3M22.1587532S',
pinRequired: true,
maximumPinRetries: 1,
simplePinBlocked: true,
minimumPinLength: 0,
pinCharacterSet: 'alphanumericAndSymbol',
periodBeforePinReset: 'PT3M29.6631862S',
allowedDataStorageLocations: [
'sharePoint'
],
contactSyncBlocked: true,
printBlocked: true,
fingerprintBlocked: true,
disableAppPinIfDevicePinIsSet: true,
minimumRequiredOsVersion: 'Minimum Required Os Version value',
minimumWarningOsVersion: 'Minimum Warning Os Version value',
minimumRequiredAppVersion: 'Minimum Required App Version value',
minimumWarningAppVersion: 'Minimum Warning App Version value',
managedBrowser: 'microsoftEdge',
isAssigned: true,
appDataEncryptionType: 'afterDeviceRestart',
minimumRequiredSdkVersion: 'Minimum Required Sdk Version value',
deployedAppCount: 0,
faceIdBlocked: true,
customBrowserProtocol: 'Custom Browser Protocol value'
};
await client.api('/deviceAppManagement/iosManagedAppProtections')
.post(iosManagedAppProtection);
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\IosManagedAppProtection;
use Microsoft\Graph\Generated\Models\ManagedAppDataTransferLevel;
use Microsoft\Graph\Generated\Models\ManagedAppClipboardSharingLevel;
use Microsoft\Graph\Generated\Models\ManagedAppPinCharacterSet;
use Microsoft\Graph\Generated\Models\ManagedAppDataStorageLocation;
use Microsoft\Graph\Generated\Models\ManagedBrowserType;
use Microsoft\Graph\Generated\Models\ManagedAppDataEncryptionType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new IosManagedAppProtection();
$requestBody->setOdataType('#microsoft.graph.iosManagedAppProtection');
$requestBody->setDisplayName('Display Name value');
$requestBody->setDescription('Description value');
$requestBody->setVersion('Version value');
$requestBody->setPeriodOfflineBeforeAccessCheck(new \DateInterval('-PT17.1357909S'));
$requestBody->setPeriodOnlineBeforeAccessCheck(new \DateInterval('PT35.0018757S'));
$requestBody->setAllowedInboundDataTransferSources(new ManagedAppDataTransferLevel('managedApps'));
$requestBody->setAllowedOutboundDataTransferDestinations(new ManagedAppDataTransferLevel('managedApps'));
$requestBody->setOrganizationalCredentialsRequired(true);
$requestBody->setAllowedOutboundClipboardSharingLevel(new ManagedAppClipboardSharingLevel('managedAppsWithPasteIn'));
$requestBody->setDataBackupBlocked(true);
$requestBody->setDeviceComplianceRequired(true);
$requestBody->setManagedBrowserToOpenLinksRequired(true);
$requestBody->setSaveAsBlocked(true);
$requestBody->setPeriodOfflineBeforeWipeIsEnforced(new \DateInterval('-PT3M22.1587532S'));
$requestBody->setPinRequired(true);
$requestBody->setMaximumPinRetries(1);
$requestBody->setSimplePinBlocked(true);
$requestBody->setMinimumPinLength(0);
$requestBody->setPinCharacterSet(new ManagedAppPinCharacterSet('alphanumericAndSymbol'));
$requestBody->setPeriodBeforePinReset(new \DateInterval('PT3M29.6631862S'));
$requestBody->setAllowedDataStorageLocations([new ManagedAppDataStorageLocation('sharePoint'), ]);
$requestBody->setContactSyncBlocked(true);
$requestBody->setPrintBlocked(true);
$requestBody->setFingerprintBlocked(true);
$requestBody->setDisableAppPinIfDevicePinIsSet(true);
$requestBody->setMinimumRequiredOsVersion('Minimum Required Os Version value');
$requestBody->setMinimumWarningOsVersion('Minimum Warning Os Version value');
$requestBody->setMinimumRequiredAppVersion('Minimum Required App Version value');
$requestBody->setMinimumWarningAppVersion('Minimum Warning App Version value');
$requestBody->setManagedBrowser(new ManagedBrowserType('microsoftEdge'));
$requestBody->setIsAssigned(true);
$requestBody->setAppDataEncryptionType(new ManagedAppDataEncryptionType('afterDeviceRestart'));
$requestBody->setMinimumRequiredSdkVersion('Minimum Required Sdk Version value');
$requestBody->setDeployedAppCount(0);
$requestBody->setFaceIdBlocked(true);
$requestBody->setCustomBrowserProtocol('Custom Browser Protocol value');
$result = $graphServiceClient->deviceAppManagement()->iosManagedAppProtections()->post($requestBody)->wait();
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
Import-Module Microsoft.Graph.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.iosManagedAppProtection"
displayName = "Display Name value"
description = "Description value"
version = "Version value"
periodOfflineBeforeAccessCheck = "-PT17.1357909S"
periodOnlineBeforeAccessCheck = "PT35.0018757S"
allowedInboundDataTransferSources = "managedApps"
allowedOutboundDataTransferDestinations = "managedApps"
organizationalCredentialsRequired = $true
allowedOutboundClipboardSharingLevel = "managedAppsWithPasteIn"
dataBackupBlocked = $true
deviceComplianceRequired = $true
managedBrowserToOpenLinksRequired = $true
saveAsBlocked = $true
periodOfflineBeforeWipeIsEnforced = "-PT3M22.1587532S"
pinRequired = $true
maximumPinRetries = 1
simplePinBlocked = $true
minimumPinLength = 0
pinCharacterSet = "alphanumericAndSymbol"
periodBeforePinReset = "PT3M29.6631862S"
allowedDataStorageLocations = @(
"sharePoint"
)
contactSyncBlocked = $true
printBlocked = $true
fingerprintBlocked = $true
disableAppPinIfDevicePinIsSet = $true
minimumRequiredOsVersion = "Minimum Required Os Version value"
minimumWarningOsVersion = "Minimum Warning Os Version value"
minimumRequiredAppVersion = "Minimum Required App Version value"
minimumWarningAppVersion = "Minimum Warning App Version value"
managedBrowser = "microsoftEdge"
isAssigned = $true
appDataEncryptionType = "afterDeviceRestart"
minimumRequiredSdkVersion = "Minimum Required Sdk Version value"
deployedAppCount = 0
faceIdBlocked = $true
customBrowserProtocol = "Custom Browser Protocol value"
}
New-MgDeviceAppManagementiOSManagedAppProtection -BodyParameter $params
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.ios_managed_app_protection import IosManagedAppProtection
from msgraph.generated.models.managed_app_data_transfer_level import ManagedAppDataTransferLevel
from msgraph.generated.models.managed_app_clipboard_sharing_level import ManagedAppClipboardSharingLevel
from msgraph.generated.models.managed_app_pin_character_set import ManagedAppPinCharacterSet
from msgraph.generated.models.managed_app_data_storage_location import ManagedAppDataStorageLocation
from msgraph.generated.models.managed_browser_type import ManagedBrowserType
from msgraph.generated.models.managed_app_data_encryption_type import ManagedAppDataEncryptionType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = IosManagedAppProtection(
odata_type = "#microsoft.graph.iosManagedAppProtection",
display_name = "Display Name value",
description = "Description value",
version = "Version value",
period_offline_before_access_check = "-PT17.1357909S",
period_online_before_access_check = "PT35.0018757S",
allowed_inbound_data_transfer_sources = ManagedAppDataTransferLevel.ManagedApps,
allowed_outbound_data_transfer_destinations = ManagedAppDataTransferLevel.ManagedApps,
organizational_credentials_required = True,
allowed_outbound_clipboard_sharing_level = ManagedAppClipboardSharingLevel.ManagedAppsWithPasteIn,
data_backup_blocked = True,
device_compliance_required = True,
managed_browser_to_open_links_required = True,
save_as_blocked = True,
period_offline_before_wipe_is_enforced = "-PT3M22.1587532S",
pin_required = True,
maximum_pin_retries = 1,
simple_pin_blocked = True,
minimum_pin_length = 0,
pin_character_set = ManagedAppPinCharacterSet.AlphanumericAndSymbol,
period_before_pin_reset = "PT3M29.6631862S",
allowed_data_storage_locations = [
ManagedAppDataStorageLocation.SharePoint,
],
contact_sync_blocked = True,
print_blocked = True,
fingerprint_blocked = True,
disable_app_pin_if_device_pin_is_set = True,
minimum_required_os_version = "Minimum Required Os Version value",
minimum_warning_os_version = "Minimum Warning Os Version value",
minimum_required_app_version = "Minimum Required App Version value",
minimum_warning_app_version = "Minimum Warning App Version value",
managed_browser = ManagedBrowserType.MicrosoftEdge,
is_assigned = True,
app_data_encryption_type = ManagedAppDataEncryptionType.AfterDeviceRestart,
minimum_required_sdk_version = "Minimum Required Sdk Version value",
deployed_app_count = 0,
face_id_blocked = True,
custom_browser_protocol = "Custom Browser Protocol value",
)
result = await graph_client.device_app_management.ios_managed_app_protections.post(request_body)
Pour plus d’informations sur la façon d'ajouter le Kit de développement logiciel (SDK) à votre projet et créer une instance authProvider, consultez la documentation du Kit de développement logiciel (SDK).
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.