Indicates the operating system / platform of the discovered application. Some possible values are Windows, iOS, macOS. The default value is unknown (0). Possible values are: unknown, windows, windowsMobile, windowsHolographic, ios, macOS, chromeOS, androidOSP, androidDeviceAdministrator, androidWorkProfile, androidDedicatedAndFullyManaged, unknownFutureValue.
Response
If successful, this method returns a 201 Created response code and a detectedApp object in the response body.
// 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.PostAsync(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().Post(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().post(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.post(request_body)
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.