Aktualisieren von androidWorkProfileCompliancePolicy
Artikel 12/04/2023
12 Mitwirkende
Feedback
In diesem Artikel
Namespace: microsoft.graph
Hinweis: Die Microsoft Graph-API für Intune setzt eine aktive Intune-Lizenz für den Mandanten voraus.
Aktualisiert die Eigenschaften eines androidWorkProfileCompliancePolicy-Objekts .
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
Globaler Dienst
US Government L4
US Government L5 (DOD)
China, betrieben von 21Vianet
✅
✅
✅
✅
Berechtigungen
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 .
Berechtigungstyp
Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten)
Delegiert (Geschäfts-, Schul- oder Unikonto)
DeviceManagementConfiguration.ReadWrite.All
Delegiert (persönliches Microsoft-Konto)
Nicht unterstützt
Anwendung
DeviceManagementConfiguration.ReadWrite.All
HTTP-Anforderung
PATCH /deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicyId}
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung für das Objekt androidWorkProfileCompliancePolicy an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die beim Erstellen von androidWorkProfileCompliancePolicy erforderlich sind.
Eigenschaft
Typ
Beschreibung
id
String
Schlüssel der Entität Geerbt von deviceCompliancePolicy .
createdDateTime
DateTimeOffset
Datum und Uhrzeit der Erstellung des Objekts. Geerbt von deviceCompliancePolicy .
description
String
Beschreibung der Gerätekonfiguration (vom Administrator festgelegt). Geerbt von deviceCompliancePolicy .
lastModifiedDateTime
DateTimeOffset
Datum und Uhrzeit der letzten Änderung des Objekts. Geerbt von deviceCompliancePolicy .
displayName
String
Name der Gerätekonfiguration (vom Administrator festgelegt). Geerbt von deviceCompliancePolicy .
Version
Int32
Version der Gerätekonfiguration. Geerbt von deviceCompliancePolicy .
passwordRequired
Boolean
Legt fest, dass zum Entsperren des Geräts ein Kennwort erforderlich ist.
passwordMinimumLength
Int32
Mindestlänge des Kennworts. Gültige Werte: 4 bis 16.
passwordRequiredType
androidRequiredPasswordType
Typ der Zeichen im Kennwort. Mögliche Werte: deviceDefault
, alphabetic
, alphanumeric
, alphanumericWithSymbols
, lowSecurityBiometric
, numeric
, numericComplex
, any
.
passwordMinutesOfInactivityBeforeLock
Int32
Zeitraum von Inaktivität in Minuten, nach dem die Eingabe eines Kennworts gefordert wird
passwordExpirationDays
Int32
Zeit in Tagen bis zum Ablaufen des Kennworts. Gültige Werte: 1 bis 365.
passwordPreviousPasswordBlockCount
Int32
Anzahl der zuletzt verwendeten Kennwörter, die nicht erneut verwendet werden dürfen. Gültige Werte: 1 bis 24.
securityPreventInstallAppsFromUnknownSources
Boolean
Legt fest, dass Geräte die Installation von Apps aus unbekannten Quellen nicht zulassen dürfen.
securityDisableUsbDebugging
Boolean
Deaktiviert das USB-Debuggen auf Android-Geräten.
securityRequireVerifyApps
Boolean
Legt fest, dass die Android-Funktion „Verify Apps“ aktiviert sein muss.
deviceThreatProtectionEnabled
Boolean
Legt fest, dass auf Geräten der Gerätebedrohungsschutz aktiviert sein muss.
deviceThreatProtectionRequiredSecurityLevel
deviceThreatProtectionLevel
Legt die Mindestrisikostufe fest, ab der Mobile Threat Protection einen Konformitätsverstoß melden soll. Mögliche Werte sind: unavailable
, secured
, low
, medium
, high
und notSet
.
securityBlockJailbrokenDevices
Boolean
Legt fest, dass weder gerootete Geräte verwendet werden dürfen noch Geräte, für die ein Jailbreak durchgeführt wurde.
osMinimumVersion
String
Mindestversion von Android
osMaximumVersion
String
Maximalversion von Android
minAndroidSecurityPatchLevel
String
Mindestens geforderter Sicherheitspatchlevel von Android
storageRequireEncryption
Boolean
Legt fest, dass auf Android-Geräten Verschlüsselung aktiviert sein muss.
securityRequireSafetyNetAttestationBasicIntegrity
Boolean
Legt fest, dass das Gerät die SafetyNet-Basisintegritätsprüfung bestanden haben muss.
securityRequireSafetyNetAttestationCertifiedDevice
Boolean
Legt fest, dass das Gerät die Prüfung zum SafetyNet-zertifizierten Gerät bestanden haben muss.
securityRequireGooglePlayServices
Boolean
Legt fest, dass Google Play Services auf dem Gerät installiert und aktiviert sein muss.
securityRequireUpToDateSecurityProviders
Boolean
Legt fest, dass die Sicherheitsanbieter des Geräts aktuell sein müssen. Die aktuelle Version von Google Play Services muss auf dem Gerät installiert und aktiviert sein.
securityRequireCompanyPortalAppIntegrity
Boolean
Legt fest, dass das Gerät die Laufzeitintegritätsprüfung für Unternehmensportal-Client-Apps bestanden haben muss.
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 200 OK
Antwortcode und ein aktualisiertes objekt androidWorkProfileCompliancePolicy im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicyId}
Content-type: application/json
Content-length: 1170
{
"@odata.type": "#microsoft.graph.androidWorkProfileCompliancePolicy",
"description": "Description value",
"displayName": "Display Name value",
"version": 7,
"passwordRequired": true,
"passwordMinimumLength": 5,
"passwordRequiredType": "alphabetic",
"passwordMinutesOfInactivityBeforeLock": 5,
"passwordExpirationDays": 6,
"passwordPreviousPasswordBlockCount": 2,
"securityPreventInstallAppsFromUnknownSources": true,
"securityDisableUsbDebugging": true,
"securityRequireVerifyApps": true,
"deviceThreatProtectionEnabled": true,
"deviceThreatProtectionRequiredSecurityLevel": "secured",
"securityBlockJailbrokenDevices": true,
"osMinimumVersion": "Os Minimum Version value",
"osMaximumVersion": "Os Maximum Version value",
"minAndroidSecurityPatchLevel": "Min Android Security Patch Level value",
"storageRequireEncryption": true,
"securityRequireSafetyNetAttestationBasicIntegrity": true,
"securityRequireSafetyNetAttestationCertifiedDevice": true,
"securityRequireGooglePlayServices": true,
"securityRequireUpToDateSecurityProviders": true,
"securityRequireCompanyPortalAppIntegrity": true
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new AndroidWorkProfileCompliancePolicy
{
OdataType = "#microsoft.graph.androidWorkProfileCompliancePolicy",
Description = "Description value",
DisplayName = "Display Name value",
Version = 7,
PasswordRequired = true,
PasswordMinimumLength = 5,
PasswordRequiredType = AndroidRequiredPasswordType.Alphabetic,
PasswordMinutesOfInactivityBeforeLock = 5,
PasswordExpirationDays = 6,
PasswordPreviousPasswordBlockCount = 2,
SecurityPreventInstallAppsFromUnknownSources = true,
SecurityDisableUsbDebugging = true,
SecurityRequireVerifyApps = true,
DeviceThreatProtectionEnabled = true,
DeviceThreatProtectionRequiredSecurityLevel = DeviceThreatProtectionLevel.Secured,
SecurityBlockJailbrokenDevices = true,
OsMinimumVersion = "Os Minimum Version value",
OsMaximumVersion = "Os Maximum Version value",
MinAndroidSecurityPatchLevel = "Min Android Security Patch Level value",
StorageRequireEncryption = true,
SecurityRequireSafetyNetAttestationBasicIntegrity = true,
SecurityRequireSafetyNetAttestationCertifiedDevice = true,
SecurityRequireGooglePlayServices = true,
SecurityRequireUpToDateSecurityProviders = true,
SecurityRequireCompanyPortalAppIntegrity = true,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DeviceCompliancePolicies["{deviceCompliancePolicy-id}"].PatchAsync(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-management device-compliance-policies patch --device-compliance-policy-id {deviceCompliancePolicy-id} --body '{\
"@odata.type": "#microsoft.graph.androidWorkProfileCompliancePolicy",\
"description": "Description value",\
"displayName": "Display Name value",\
"version": 7,\
"passwordRequired": true,\
"passwordMinimumLength": 5,\
"passwordRequiredType": "alphabetic",\
"passwordMinutesOfInactivityBeforeLock": 5,\
"passwordExpirationDays": 6,\
"passwordPreviousPasswordBlockCount": 2,\
"securityPreventInstallAppsFromUnknownSources": true,\
"securityDisableUsbDebugging": true,\
"securityRequireVerifyApps": true,\
"deviceThreatProtectionEnabled": true,\
"deviceThreatProtectionRequiredSecurityLevel": "secured",\
"securityBlockJailbrokenDevices": true,\
"osMinimumVersion": "Os Minimum Version value",\
"osMaximumVersion": "Os Maximum Version value",\
"minAndroidSecurityPatchLevel": "Min Android Security Patch Level value",\
"storageRequireEncryption": true,\
"securityRequireSafetyNetAttestationBasicIntegrity": true,\
"securityRequireSafetyNetAttestationCertifiedDevice": true,\
"securityRequireGooglePlayServices": true,\
"securityRequireUpToDateSecurityProviders": true,\
"securityRequireCompanyPortalAppIntegrity": true\
}\
'
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"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewDeviceCompliancePolicy()
description := "Description value"
requestBody.SetDescription(&description)
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
version := int32(7)
requestBody.SetVersion(&version)
passwordRequired := true
requestBody.SetPasswordRequired(&passwordRequired)
passwordMinimumLength := int32(5)
requestBody.SetPasswordMinimumLength(&passwordMinimumLength)
passwordRequiredType := graphmodels.ALPHABETIC_ANDROIDREQUIREDPASSWORDTYPE
requestBody.SetPasswordRequiredType(&passwordRequiredType)
passwordMinutesOfInactivityBeforeLock := int32(5)
requestBody.SetPasswordMinutesOfInactivityBeforeLock(&passwordMinutesOfInactivityBeforeLock)
passwordExpirationDays := int32(6)
requestBody.SetPasswordExpirationDays(&passwordExpirationDays)
passwordPreviousPasswordBlockCount := int32(2)
requestBody.SetPasswordPreviousPasswordBlockCount(&passwordPreviousPasswordBlockCount)
securityPreventInstallAppsFromUnknownSources := true
requestBody.SetSecurityPreventInstallAppsFromUnknownSources(&securityPreventInstallAppsFromUnknownSources)
securityDisableUsbDebugging := true
requestBody.SetSecurityDisableUsbDebugging(&securityDisableUsbDebugging)
securityRequireVerifyApps := true
requestBody.SetSecurityRequireVerifyApps(&securityRequireVerifyApps)
deviceThreatProtectionEnabled := true
requestBody.SetDeviceThreatProtectionEnabled(&deviceThreatProtectionEnabled)
deviceThreatProtectionRequiredSecurityLevel := graphmodels.SECURED_DEVICETHREATPROTECTIONLEVEL
requestBody.SetDeviceThreatProtectionRequiredSecurityLevel(&deviceThreatProtectionRequiredSecurityLevel)
securityBlockJailbrokenDevices := true
requestBody.SetSecurityBlockJailbrokenDevices(&securityBlockJailbrokenDevices)
osMinimumVersion := "Os Minimum Version value"
requestBody.SetOsMinimumVersion(&osMinimumVersion)
osMaximumVersion := "Os Maximum Version value"
requestBody.SetOsMaximumVersion(&osMaximumVersion)
minAndroidSecurityPatchLevel := "Min Android Security Patch Level value"
requestBody.SetMinAndroidSecurityPatchLevel(&minAndroidSecurityPatchLevel)
storageRequireEncryption := true
requestBody.SetStorageRequireEncryption(&storageRequireEncryption)
securityRequireSafetyNetAttestationBasicIntegrity := true
requestBody.SetSecurityRequireSafetyNetAttestationBasicIntegrity(&securityRequireSafetyNetAttestationBasicIntegrity)
securityRequireSafetyNetAttestationCertifiedDevice := true
requestBody.SetSecurityRequireSafetyNetAttestationCertifiedDevice(&securityRequireSafetyNetAttestationCertifiedDevice)
securityRequireGooglePlayServices := true
requestBody.SetSecurityRequireGooglePlayServices(&securityRequireGooglePlayServices)
securityRequireUpToDateSecurityProviders := true
requestBody.SetSecurityRequireUpToDateSecurityProviders(&securityRequireUpToDateSecurityProviders)
securityRequireCompanyPortalAppIntegrity := true
requestBody.SetSecurityRequireCompanyPortalAppIntegrity(&securityRequireCompanyPortalAppIntegrity)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
deviceCompliancePolicies, err := graphClient.DeviceManagement().DeviceCompliancePolicies().ByDeviceCompliancePolicyId("deviceCompliancePolicy-id").Patch(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);
AndroidWorkProfileCompliancePolicy deviceCompliancePolicy = new AndroidWorkProfileCompliancePolicy();
deviceCompliancePolicy.setOdataType("#microsoft.graph.androidWorkProfileCompliancePolicy");
deviceCompliancePolicy.setDescription("Description value");
deviceCompliancePolicy.setDisplayName("Display Name value");
deviceCompliancePolicy.setVersion(7);
deviceCompliancePolicy.setPasswordRequired(true);
deviceCompliancePolicy.setPasswordMinimumLength(5);
deviceCompliancePolicy.setPasswordRequiredType(AndroidRequiredPasswordType.Alphabetic);
deviceCompliancePolicy.setPasswordMinutesOfInactivityBeforeLock(5);
deviceCompliancePolicy.setPasswordExpirationDays(6);
deviceCompliancePolicy.setPasswordPreviousPasswordBlockCount(2);
deviceCompliancePolicy.setSecurityPreventInstallAppsFromUnknownSources(true);
deviceCompliancePolicy.setSecurityDisableUsbDebugging(true);
deviceCompliancePolicy.setSecurityRequireVerifyApps(true);
deviceCompliancePolicy.setDeviceThreatProtectionEnabled(true);
deviceCompliancePolicy.setDeviceThreatProtectionRequiredSecurityLevel(DeviceThreatProtectionLevel.Secured);
deviceCompliancePolicy.setSecurityBlockJailbrokenDevices(true);
deviceCompliancePolicy.setOsMinimumVersion("Os Minimum Version value");
deviceCompliancePolicy.setOsMaximumVersion("Os Maximum Version value");
deviceCompliancePolicy.setMinAndroidSecurityPatchLevel("Min Android Security Patch Level value");
deviceCompliancePolicy.setStorageRequireEncryption(true);
deviceCompliancePolicy.setSecurityRequireSafetyNetAttestationBasicIntegrity(true);
deviceCompliancePolicy.setSecurityRequireSafetyNetAttestationCertifiedDevice(true);
deviceCompliancePolicy.setSecurityRequireGooglePlayServices(true);
deviceCompliancePolicy.setSecurityRequireUpToDateSecurityProviders(true);
deviceCompliancePolicy.setSecurityRequireCompanyPortalAppIntegrity(true);
DeviceCompliancePolicy result = graphClient.deviceManagement().deviceCompliancePolicies().byDeviceCompliancePolicyId("{deviceCompliancePolicy-id}").patch(deviceCompliancePolicy);
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 deviceCompliancePolicy = {
'@odata.type': '#microsoft.graph.androidWorkProfileCompliancePolicy',
description: 'Description value',
displayName: 'Display Name value',
version: 7,
passwordRequired: true,
passwordMinimumLength: 5,
passwordRequiredType: 'alphabetic',
passwordMinutesOfInactivityBeforeLock: 5,
passwordExpirationDays: 6,
passwordPreviousPasswordBlockCount: 2,
securityPreventInstallAppsFromUnknownSources: true,
securityDisableUsbDebugging: true,
securityRequireVerifyApps: true,
deviceThreatProtectionEnabled: true,
deviceThreatProtectionRequiredSecurityLevel: 'secured',
securityBlockJailbrokenDevices: true,
osMinimumVersion: 'Os Minimum Version value',
osMaximumVersion: 'Os Maximum Version value',
minAndroidSecurityPatchLevel: 'Min Android Security Patch Level value',
storageRequireEncryption: true,
securityRequireSafetyNetAttestationBasicIntegrity: true,
securityRequireSafetyNetAttestationCertifiedDevice: true,
securityRequireGooglePlayServices: true,
securityRequireUpToDateSecurityProviders: true,
securityRequireCompanyPortalAppIntegrity: true
};
await client.api('/deviceManagement/deviceCompliancePolicies/{deviceCompliancePolicyId}')
.update(deviceCompliancePolicy);
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\AndroidWorkProfileCompliancePolicy;
use Microsoft\Graph\Generated\Models\AndroidRequiredPasswordType;
use Microsoft\Graph\Generated\Models\DeviceThreatProtectionLevel;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AndroidWorkProfileCompliancePolicy();
$requestBody->setOdataType('#microsoft.graph.androidWorkProfileCompliancePolicy');
$requestBody->setDescription('Description value');
$requestBody->setDisplayName('Display Name value');
$requestBody->setVersion(7);
$requestBody->setPasswordRequired(true);
$requestBody->setPasswordMinimumLength(5);
$requestBody->setPasswordRequiredType(new AndroidRequiredPasswordType('alphabetic'));
$requestBody->setPasswordMinutesOfInactivityBeforeLock(5);
$requestBody->setPasswordExpirationDays(6);
$requestBody->setPasswordPreviousPasswordBlockCount(2);
$requestBody->setSecurityPreventInstallAppsFromUnknownSources(true);
$requestBody->setSecurityDisableUsbDebugging(true);
$requestBody->setSecurityRequireVerifyApps(true);
$requestBody->setDeviceThreatProtectionEnabled(true);
$requestBody->setDeviceThreatProtectionRequiredSecurityLevel(new DeviceThreatProtectionLevel('secured'));
$requestBody->setSecurityBlockJailbrokenDevices(true);
$requestBody->setOsMinimumVersion('Os Minimum Version value');
$requestBody->setOsMaximumVersion('Os Maximum Version value');
$requestBody->setMinAndroidSecurityPatchLevel('Min Android Security Patch Level value');
$requestBody->setStorageRequireEncryption(true);
$requestBody->setSecurityRequireSafetyNetAttestationBasicIntegrity(true);
$requestBody->setSecurityRequireSafetyNetAttestationCertifiedDevice(true);
$requestBody->setSecurityRequireGooglePlayServices(true);
$requestBody->setSecurityRequireUpToDateSecurityProviders(true);
$requestBody->setSecurityRequireCompanyPortalAppIntegrity(true);
$result = $graphServiceClient->deviceManagement()->deviceCompliancePolicies()->byDeviceCompliancePolicyId('deviceCompliancePolicy-id')->patch($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.DeviceManagement
$params = @{
"@odata.type" = "#microsoft.graph.androidWorkProfileCompliancePolicy"
description = "Description value"
displayName = "Display Name value"
version = 7
passwordRequired = $true
passwordMinimumLength =
passwordRequiredType = "alphabetic"
passwordMinutesOfInactivityBeforeLock =
passwordExpirationDays =
passwordPreviousPasswordBlockCount =
securityPreventInstallAppsFromUnknownSources = $true
securityDisableUsbDebugging = $true
securityRequireVerifyApps = $true
deviceThreatProtectionEnabled = $true
deviceThreatProtectionRequiredSecurityLevel = "secured"
securityBlockJailbrokenDevices = $true
osMinimumVersion = "Os Minimum Version value"
osMaximumVersion = "Os Maximum Version value"
minAndroidSecurityPatchLevel = "Min Android Security Patch Level value"
storageRequireEncryption = $true
securityRequireSafetyNetAttestationBasicIntegrity = $true
securityRequireSafetyNetAttestationCertifiedDevice = $true
securityRequireGooglePlayServices = $true
securityRequireUpToDateSecurityProviders = $true
securityRequireCompanyPortalAppIntegrity = $true
}
Update-MgDeviceManagementDeviceCompliancePolicy -DeviceCompliancePolicyId $deviceCompliancePolicyId -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_work_profile_compliance_policy import AndroidWorkProfileCompliancePolicy
from msgraph.generated.models.android_required_password_type import AndroidRequiredPasswordType
from msgraph.generated.models.device_threat_protection_level import DeviceThreatProtectionLevel
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AndroidWorkProfileCompliancePolicy(
odata_type = "#microsoft.graph.androidWorkProfileCompliancePolicy",
description = "Description value",
display_name = "Display Name value",
version = 7,
password_required = True,
password_minimum_length = 5,
password_required_type = AndroidRequiredPasswordType.Alphabetic,
password_minutes_of_inactivity_before_lock = 5,
password_expiration_days = 6,
password_previous_password_block_count = 2,
security_prevent_install_apps_from_unknown_sources = True,
security_disable_usb_debugging = True,
security_require_verify_apps = True,
device_threat_protection_enabled = True,
device_threat_protection_required_security_level = DeviceThreatProtectionLevel.Secured,
security_block_jailbroken_devices = True,
os_minimum_version = "Os Minimum Version value",
os_maximum_version = "Os Maximum Version value",
min_android_security_patch_level = "Min Android Security Patch Level value",
storage_require_encryption = True,
security_require_safety_net_attestation_basic_integrity = True,
security_require_safety_net_attestation_certified_device = True,
security_require_google_play_services = True,
security_require_up_to_date_security_providers = True,
security_require_company_portal_app_integrity = True,
)
result = await graph_client.device_management.device_compliance_policies.by_device_compliance_policy_id('deviceCompliancePolicy-id').patch(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 .
Antwort
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.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1342
{
"@odata.type": "#microsoft.graph.androidWorkProfileCompliancePolicy",
"id": "4e385271-5271-4e38-7152-384e7152384e",
"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,
"passwordRequired": true,
"passwordMinimumLength": 5,
"passwordRequiredType": "alphabetic",
"passwordMinutesOfInactivityBeforeLock": 5,
"passwordExpirationDays": 6,
"passwordPreviousPasswordBlockCount": 2,
"securityPreventInstallAppsFromUnknownSources": true,
"securityDisableUsbDebugging": true,
"securityRequireVerifyApps": true,
"deviceThreatProtectionEnabled": true,
"deviceThreatProtectionRequiredSecurityLevel": "secured",
"securityBlockJailbrokenDevices": true,
"osMinimumVersion": "Os Minimum Version value",
"osMaximumVersion": "Os Maximum Version value",
"minAndroidSecurityPatchLevel": "Min Android Security Patch Level value",
"storageRequireEncryption": true,
"securityRequireSafetyNetAttestationBasicIntegrity": true,
"securityRequireSafetyNetAttestationCertifiedDevice": true,
"securityRequireGooglePlayServices": true,
"securityRequireUpToDateSecurityProviders": true,
"securityRequireCompanyPortalAppIntegrity": true
}