// 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 major version. Current major version is $v1.*
// Dependencies
import (
"context"
"github.com/google/uuid"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewDeviceManagement()
settings := graphmodels.NewDeviceManagementSettings()
deviceComplianceCheckinThresholdDays := int32(4)
settings.SetDeviceComplianceCheckinThresholdDays(&deviceComplianceCheckinThresholdDays)
isScheduledActionEnabled := true
settings.SetIsScheduledActionEnabled(&isScheduledActionEnabled)
secureByDefault := true
settings.SetSecureByDefault(&secureByDefault)
requestBody.SetSettings(settings)
intuneAccountId := uuid.MustParse("cf1549a1-49a1-cf15-a149-15cfa14915cf")
requestBody.SetIntuneAccountId(&intuneAccountId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
deviceManagement, err := graphClient.DeviceManagement().Patch(context.Background(), requestBody, nil)
// 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();
Veja a seguir um exemplo da resposta. Observação: o objeto response mostrado aqui pode estar truncado por motivos de concisão. Todas as propriedades serão retornadas de uma chamada real.
Em breve: Ao longo de 2024, eliminaremos os problemas do GitHub como o mecanismo de comentários para conteúdo e o substituiremos por um novo sistema de comentários. Para obter mais informações, consulte https://aka.ms/ContentUserFeedback.