// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceManagement
{
OdataType = "#microsoft.graph.deviceManagement",
Settings = new DeviceManagementSettings
{
OdataType = "microsoft.graph.deviceManagementSettings",
DeviceComplianceCheckinThresholdDays = 4,
IsScheduledActionEnabled = true,
SecureByDefault = true,
},
IntuneAccountId = Guid.Parse("cf1549a1-49a1-cf15-a149-15cfa14915cf"),
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceManagement deviceManagement = new DeviceManagement();
deviceManagement.setOdataType("#microsoft.graph.deviceManagement");
DeviceManagementSettings settings = new DeviceManagementSettings();
settings.setOdataType("microsoft.graph.deviceManagementSettings");
settings.setDeviceComplianceCheckinThresholdDays(4);
settings.setIsScheduledActionEnabled(true);
settings.setSecureByDefault(true);
deviceManagement.setSettings(settings);
deviceManagement.setIntuneAccountId(UUID.fromString("cf1549a1-49a1-cf15-a149-15cfa14915cf"));
DeviceManagement result = graphClient.deviceManagement().patch(deviceManagement);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\DeviceManagement;
use Microsoft\Graph\Generated\Models\DeviceManagementSettings;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new DeviceManagement();
$requestBody->setOdataType('#microsoft.graph.deviceManagement');
$settings = new DeviceManagementSettings();
$settings->setOdataType('microsoft.graph.deviceManagementSettings');
$settings->setDeviceComplianceCheckinThresholdDays(4);
$settings->setIsScheduledActionEnabled(true);
$settings->setSecureByDefault(true);
$requestBody->setSettings($settings);
$requestBody->setIntuneAccountId('cf1549a1-49a1-cf15-a149-15cfa14915cf');
$result = $graphServiceClient->deviceManagement()->patch($requestBody)->wait();
Aquí tiene un ejemplo de la respuesta. Nota: Es posible que el objeto de respuesta que aparezca aquí esté truncado para abreviar. Todas las propiedades se devolverán desde una llamada real.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea: https://aka.ms/ContentUserFeedback.