Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen.
Geben Sie als Anforderungstext eine JSON-Darstellung des Objekts des Typs „androidManagedAppProtection“ an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die angegeben werden müssen, wenn Sie ein Objekt des Typs „androidManagedAppProtection“ erstellen.
Nachfolgend sehen Sie ein Beispiel der Anforderung.
POST https://graph.microsoft.com/v1.0/deviceAppManagement/androidManagedAppProtections
Content-type: application/json
Content-length: 1862
{
"@odata.type": "#microsoft.graph.androidManagedAppProtection",
"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,
"screenCaptureBlocked": true,
"disableAppEncryptionIfDeviceEncryptionIsEnabled": true,
"encryptAppData": true,
"deployedAppCount": 0,
"minimumRequiredPatchVersion": "Minimum Required Patch Version value",
"minimumWarningPatchVersion": "Minimum Warning Patch Version value",
"customBrowserPackageId": "Custom Browser Package Id value",
"customBrowserDisplayName": "Custom Browser Display Name value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new AndroidManagedAppProtection
{
OdataType = "#microsoft.graph.androidManagedAppProtection",
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,
ScreenCaptureBlocked = true,
DisableAppEncryptionIfDeviceEncryptionIsEnabled = true,
EncryptAppData = true,
DeployedAppCount = 0,
MinimumRequiredPatchVersion = "Minimum Required Patch Version value",
MinimumWarningPatchVersion = "Minimum Warning Patch Version value",
CustomBrowserPackageId = "Custom Browser Package Id value",
CustomBrowserDisplayName = "Custom Browser Display Name 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.AndroidManagedAppProtections.PostAsync(requestBody);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
mgc device-app-management android-managed-app-protections create --body '{\
"@odata.type": "#microsoft.graph.androidManagedAppProtection",\
"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,\
"screenCaptureBlocked": true,\
"disableAppEncryptionIfDeviceEncryptionIsEnabled": true,\
"encryptAppData": true,\
"deployedAppCount": 0,\
"minimumRequiredPatchVersion": "Minimum Required Patch Version value",\
"minimumWarningPatchVersion": "Minimum Warning Patch Version value",\
"customBrowserPackageId": "Custom Browser Package Id value",\
"customBrowserDisplayName": "Custom Browser Display Name value"\
}\
'
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// 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.NewAndroidManagedAppProtection()
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)
screenCaptureBlocked := true
requestBody.SetScreenCaptureBlocked(&screenCaptureBlocked)
disableAppEncryptionIfDeviceEncryptionIsEnabled := true
requestBody.SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(&disableAppEncryptionIfDeviceEncryptionIsEnabled)
encryptAppData := true
requestBody.SetEncryptAppData(&encryptAppData)
deployedAppCount := int32(0)
requestBody.SetDeployedAppCount(&deployedAppCount)
minimumRequiredPatchVersion := "Minimum Required Patch Version value"
requestBody.SetMinimumRequiredPatchVersion(&minimumRequiredPatchVersion)
minimumWarningPatchVersion := "Minimum Warning Patch Version value"
requestBody.SetMinimumWarningPatchVersion(&minimumWarningPatchVersion)
customBrowserPackageId := "Custom Browser Package Id value"
requestBody.SetCustomBrowserPackageId(&customBrowserPackageId)
customBrowserDisplayName := "Custom Browser Display Name value"
requestBody.SetCustomBrowserDisplayName(&customBrowserDisplayName)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
androidManagedAppProtections, err := graphClient.DeviceAppManagement().AndroidManagedAppProtections().Post(context.Background(), requestBody, nil)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AndroidManagedAppProtection androidManagedAppProtection = new AndroidManagedAppProtection();
androidManagedAppProtection.setOdataType("#microsoft.graph.androidManagedAppProtection");
androidManagedAppProtection.setDisplayName("Display Name value");
androidManagedAppProtection.setDescription("Description value");
androidManagedAppProtection.setVersion("Version value");
PeriodAndDuration periodOfflineBeforeAccessCheck = PeriodAndDuration.ofDuration(Duration.parse("-PT17.1357909S"));
androidManagedAppProtection.setPeriodOfflineBeforeAccessCheck(periodOfflineBeforeAccessCheck);
PeriodAndDuration periodOnlineBeforeAccessCheck = PeriodAndDuration.ofDuration(Duration.parse("PT35.0018757S"));
androidManagedAppProtection.setPeriodOnlineBeforeAccessCheck(periodOnlineBeforeAccessCheck);
androidManagedAppProtection.setAllowedInboundDataTransferSources(ManagedAppDataTransferLevel.ManagedApps);
androidManagedAppProtection.setAllowedOutboundDataTransferDestinations(ManagedAppDataTransferLevel.ManagedApps);
androidManagedAppProtection.setOrganizationalCredentialsRequired(true);
androidManagedAppProtection.setAllowedOutboundClipboardSharingLevel(ManagedAppClipboardSharingLevel.ManagedAppsWithPasteIn);
androidManagedAppProtection.setDataBackupBlocked(true);
androidManagedAppProtection.setDeviceComplianceRequired(true);
androidManagedAppProtection.setManagedBrowserToOpenLinksRequired(true);
androidManagedAppProtection.setSaveAsBlocked(true);
PeriodAndDuration periodOfflineBeforeWipeIsEnforced = PeriodAndDuration.ofDuration(Duration.parse("-PT3M22.1587532S"));
androidManagedAppProtection.setPeriodOfflineBeforeWipeIsEnforced(periodOfflineBeforeWipeIsEnforced);
androidManagedAppProtection.setPinRequired(true);
androidManagedAppProtection.setMaximumPinRetries(1);
androidManagedAppProtection.setSimplePinBlocked(true);
androidManagedAppProtection.setMinimumPinLength(0);
androidManagedAppProtection.setPinCharacterSet(ManagedAppPinCharacterSet.AlphanumericAndSymbol);
PeriodAndDuration periodBeforePinReset = PeriodAndDuration.ofDuration(Duration.parse("PT3M29.6631862S"));
androidManagedAppProtection.setPeriodBeforePinReset(periodBeforePinReset);
LinkedList<ManagedAppDataStorageLocation> allowedDataStorageLocations = new LinkedList<ManagedAppDataStorageLocation>();
allowedDataStorageLocations.add(ManagedAppDataStorageLocation.SharePoint);
androidManagedAppProtection.setAllowedDataStorageLocations(allowedDataStorageLocations);
androidManagedAppProtection.setContactSyncBlocked(true);
androidManagedAppProtection.setPrintBlocked(true);
androidManagedAppProtection.setFingerprintBlocked(true);
androidManagedAppProtection.setDisableAppPinIfDevicePinIsSet(true);
androidManagedAppProtection.setMinimumRequiredOsVersion("Minimum Required Os Version value");
androidManagedAppProtection.setMinimumWarningOsVersion("Minimum Warning Os Version value");
androidManagedAppProtection.setMinimumRequiredAppVersion("Minimum Required App Version value");
androidManagedAppProtection.setMinimumWarningAppVersion("Minimum Warning App Version value");
androidManagedAppProtection.setManagedBrowser(EnumSet.of(ManagedBrowserType.MicrosoftEdge));
androidManagedAppProtection.setIsAssigned(true);
androidManagedAppProtection.setScreenCaptureBlocked(true);
androidManagedAppProtection.setDisableAppEncryptionIfDeviceEncryptionIsEnabled(true);
androidManagedAppProtection.setEncryptAppData(true);
androidManagedAppProtection.setDeployedAppCount(0);
androidManagedAppProtection.setMinimumRequiredPatchVersion("Minimum Required Patch Version value");
androidManagedAppProtection.setMinimumWarningPatchVersion("Minimum Warning Patch Version value");
androidManagedAppProtection.setCustomBrowserPackageId("Custom Browser Package Id value");
androidManagedAppProtection.setCustomBrowserDisplayName("Custom Browser Display Name value");
AndroidManagedAppProtection result = graphClient.deviceAppManagement().androidManagedAppProtections().post(androidManagedAppProtection);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
const options = {
authProvider,
};
const client = Client.init(options);
const androidManagedAppProtection = {
'@odata.type': '#microsoft.graph.androidManagedAppProtection',
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,
screenCaptureBlocked: true,
disableAppEncryptionIfDeviceEncryptionIsEnabled: true,
encryptAppData: true,
deployedAppCount: 0,
minimumRequiredPatchVersion: 'Minimum Required Patch Version value',
minimumWarningPatchVersion: 'Minimum Warning Patch Version value',
customBrowserPackageId: 'Custom Browser Package Id value',
customBrowserDisplayName: 'Custom Browser Display Name value'
};
await client.api('/deviceAppManagement/androidManagedAppProtections')
.post(androidManagedAppProtection);
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\AndroidManagedAppProtection;
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;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AndroidManagedAppProtection();
$requestBody->setOdataType('#microsoft.graph.androidManagedAppProtection');
$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->setScreenCaptureBlocked(true);
$requestBody->setDisableAppEncryptionIfDeviceEncryptionIsEnabled(true);
$requestBody->setEncryptAppData(true);
$requestBody->setDeployedAppCount(0);
$requestBody->setMinimumRequiredPatchVersion('Minimum Required Patch Version value');
$requestBody->setMinimumWarningPatchVersion('Minimum Warning Patch Version value');
$requestBody->setCustomBrowserPackageId('Custom Browser Package Id value');
$requestBody->setCustomBrowserDisplayName('Custom Browser Display Name value');
$result = $graphServiceClient->deviceAppManagement()->androidManagedAppProtections()->post($requestBody)->wait();
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Import-Module Microsoft.Graph.Devices.CorporateManagement
$params = @{
"@odata.type" = "#microsoft.graph.androidManagedAppProtection"
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
screenCaptureBlocked = $true
disableAppEncryptionIfDeviceEncryptionIsEnabled = $true
encryptAppData = $true
deployedAppCount = 0
minimumRequiredPatchVersion = "Minimum Required Patch Version value"
minimumWarningPatchVersion = "Minimum Warning Patch Version value"
customBrowserPackageId = "Custom Browser Package Id value"
customBrowserDisplayName = "Custom Browser Display Name value"
}
New-MgDeviceAppManagementAndroidManagedAppProtection -BodyParameter $params
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.android_managed_app_protection import AndroidManagedAppProtection
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
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AndroidManagedAppProtection(
odata_type = "#microsoft.graph.androidManagedAppProtection",
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,
screen_capture_blocked = True,
disable_app_encryption_if_device_encryption_is_enabled = True,
encrypt_app_data = True,
deployed_app_count = 0,
minimum_required_patch_version = "Minimum Required Patch Version value",
minimum_warning_patch_version = "Minimum Warning Patch Version value",
custom_browser_package_id = "Custom Browser Package Id value",
custom_browser_display_name = "Custom Browser Display Name value",
)
result = await graph_client.device_app_management.android_managed_app_protections.post(request_body)
Einzelheiten darüber, wie Sie das SDK zu Ihrem Projekt hinzufügen und eine authProvider-Instanz erstellen, finden Sie in der SDK-Dokumentation.
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.