Для вызова этого API требуется одно из следующих разрешений. Дополнительные сведения, включая сведения о том, как выбрать разрешения, см. в статье Разрешения.
Тип разрешения
Разрешения (в порядке повышения привилегий)
Делегированные (рабочая или учебная учетная запись)
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DetectedApp
{
OdataType = "#microsoft.graph.detectedApp",
DisplayName = "Display Name value",
Version = "Version value",
SizeInByte = 10L,
DeviceCount = 11,
Publisher = "Publisher value",
Platform = DetectedAppPlatformType.Windows,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.DetectedApps["{detectedApp-id}"].PatchAsync(requestBody);
// 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.NewDetectedApp()
displayName := "Display Name value"
requestBody.SetDisplayName(&displayName)
version := "Version value"
requestBody.SetVersion(&version)
sizeInByte := int64(10)
requestBody.SetSizeInByte(&sizeInByte)
deviceCount := int32(11)
requestBody.SetDeviceCount(&deviceCount)
publisher := "Publisher value"
requestBody.SetPublisher(&publisher)
platform := graphmodels.WINDOWS_DETECTEDAPPPLATFORMTYPE
requestBody.SetPlatform(&platform)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
detectedApps, err := graphClient.DeviceManagement().DetectedApps().ByDetectedAppId("detectedApp-id").Patch(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DetectedApp detectedApp = new DetectedApp();
detectedApp.setOdataType("#microsoft.graph.detectedApp");
detectedApp.setDisplayName("Display Name value");
detectedApp.setVersion("Version value");
detectedApp.setSizeInByte(10L);
detectedApp.setDeviceCount(11);
detectedApp.setPublisher("Publisher value");
detectedApp.setPlatform(DetectedAppPlatformType.Windows);
DetectedApp result = graphClient.deviceManagement().detectedApps().byDetectedAppId("{detectedApp-id}").patch(detectedApp);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.detected_app import DetectedApp
from msgraph.generated.models.detected_app_platform_type import DetectedAppPlatformType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = DetectedApp(
odata_type = "#microsoft.graph.detectedApp",
display_name = "Display Name value",
version = "Version value",
size_in_byte = 10,
device_count = 11,
publisher = "Publisher value",
platform = DetectedAppPlatformType.Windows,
)
result = await graph_client.device_management.detected_apps.by_detected_app_id('detectedApp-id').patch(request_body)
Ниже приведен пример отклика. Примечание. Представленный здесь объект отклика может быть усечен для краткости. При фактическом вызове будут возвращены все свойства.