App management SDK generated tag, which helps relate apps hosted on the same device. Not guaranteed to relate apps in all conditions. Inherited from managedAppRegistration
Zero or more reasons an app registration is flagged. E.g. app running on rooted device Inherited from managedAppRegistration. Possible values are: none, rootedDevice.
POST https://graph.microsoft.com/v1.0/deviceAppManagement/managedAppRegistrations
Content-type: application/json
Content-length: 645
{
"@odata.type": "#microsoft.graph.androidManagedAppRegistration",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"applicationVersion": "Application Version value",
"managementSdkVersion": "Management Sdk Version value",
"platformVersion": "Platform Version value",
"deviceType": "Device Type value",
"deviceTag": "Device Tag value",
"deviceName": "Device Name value",
"flaggedReasons": [
"rootedDevice"
],
"userId": "User Id value",
"appIdentifier": {
"@odata.type": "microsoft.graph.androidMobileAppIdentifier",
"packageId": "Package Id value"
},
"version": "Version value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new AndroidManagedAppRegistration
{
OdataType = "#microsoft.graph.androidManagedAppRegistration",
LastSyncDateTime = DateTimeOffset.Parse("2017-01-01T00:02:49.3205976-08:00"),
ApplicationVersion = "Application Version value",
ManagementSdkVersion = "Management Sdk Version value",
PlatformVersion = "Platform Version value",
DeviceType = "Device Type value",
DeviceTag = "Device Tag value",
DeviceName = "Device Name value",
FlaggedReasons = new List<ManagedAppFlaggedReason?>
{
ManagedAppFlaggedReason.RootedDevice,
},
UserId = "User Id value",
AppIdentifier = new AndroidMobileAppIdentifier
{
OdataType = "microsoft.graph.androidMobileAppIdentifier",
PackageId = "Package Id value",
},
Version = "Version value",
};
// To initialize your graphClient, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceAppManagement.ManagedAppRegistrations.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
AndroidManagedAppRegistration managedAppRegistration = new AndroidManagedAppRegistration();
managedAppRegistration.setOdataType("#microsoft.graph.androidManagedAppRegistration");
OffsetDateTime lastSyncDateTime = OffsetDateTime.parse("2017-01-01T00:02:49.3205976-08:00");
managedAppRegistration.setLastSyncDateTime(lastSyncDateTime);
managedAppRegistration.setApplicationVersion("Application Version value");
managedAppRegistration.setManagementSdkVersion("Management Sdk Version value");
managedAppRegistration.setPlatformVersion("Platform Version value");
managedAppRegistration.setDeviceType("Device Type value");
managedAppRegistration.setDeviceTag("Device Tag value");
managedAppRegistration.setDeviceName("Device Name value");
LinkedList<ManagedAppFlaggedReason> flaggedReasons = new LinkedList<ManagedAppFlaggedReason>();
flaggedReasons.add(ManagedAppFlaggedReason.RootedDevice);
managedAppRegistration.setFlaggedReasons(flaggedReasons);
managedAppRegistration.setUserId("User Id value");
AndroidMobileAppIdentifier appIdentifier = new AndroidMobileAppIdentifier();
appIdentifier.setOdataType("microsoft.graph.androidMobileAppIdentifier");
appIdentifier.setPackageId("Package Id value");
managedAppRegistration.setAppIdentifier(appIdentifier);
managedAppRegistration.setVersion("Version value");
ManagedAppRegistration result = graphClient.deviceAppManagement().managedAppRegistrations().post(managedAppRegistration);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\AndroidManagedAppRegistration;
use Microsoft\Graph\Generated\Models\ManagedAppFlaggedReason;
use Microsoft\Graph\Generated\Models\AndroidMobileAppIdentifier;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AndroidManagedAppRegistration();
$requestBody->setOdataType('#microsoft.graph.androidManagedAppRegistration');
$requestBody->setLastSyncDateTime(new \DateTime('2017-01-01T00:02:49.3205976-08:00'));
$requestBody->setApplicationVersion('Application Version value');
$requestBody->setManagementSdkVersion('Management Sdk Version value');
$requestBody->setPlatformVersion('Platform Version value');
$requestBody->setDeviceType('Device Type value');
$requestBody->setDeviceTag('Device Tag value');
$requestBody->setDeviceName('Device Name value');
$requestBody->setFlaggedReasons([new ManagedAppFlaggedReason('rootedDevice'), ]);
$requestBody->setUserId('User Id value');
$appIdentifier = new AndroidMobileAppIdentifier();
$appIdentifier->setOdataType('microsoft.graph.androidMobileAppIdentifier');
$appIdentifier->setPackageId('Package Id value');
$requestBody->setAppIdentifier($appIdentifier);
$requestBody->setVersion('Version value');
$result = $graphServiceClient->deviceAppManagement()->managedAppRegistrations()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.android_managed_app_registration import AndroidManagedAppRegistration
from msgraph.generated.models.managed_app_flagged_reason import ManagedAppFlaggedReason
from msgraph.generated.models.android_mobile_app_identifier import AndroidMobileAppIdentifier
# To initialize your graph_client, see https://zcusa.951200.xyz/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AndroidManagedAppRegistration(
odata_type = "#microsoft.graph.androidManagedAppRegistration",
last_sync_date_time = "2017-01-01T00:02:49.3205976-08:00",
application_version = "Application Version value",
management_sdk_version = "Management Sdk Version value",
platform_version = "Platform Version value",
device_type = "Device Type value",
device_tag = "Device Tag value",
device_name = "Device Name value",
flagged_reasons = [
ManagedAppFlaggedReason.RootedDevice,
],
user_id = "User Id value",
app_identifier = AndroidMobileAppIdentifier(
odata_type = "microsoft.graph.androidMobileAppIdentifier",
package_id = "Package Id value",
),
version = "Version value",
)
result = await graph_client.device_app_management.managed_app_registrations.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.
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 753
{
"@odata.type": "#microsoft.graph.androidManagedAppRegistration",
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"applicationVersion": "Application Version value",
"managementSdkVersion": "Management Sdk Version value",
"platformVersion": "Platform Version value",
"deviceType": "Device Type value",
"deviceTag": "Device Tag value",
"deviceName": "Device Name value",
"flaggedReasons": [
"rootedDevice"
],
"userId": "User Id value",
"appIdentifier": {
"@odata.type": "microsoft.graph.androidMobileAppIdentifier",
"packageId": "Package Id value"
},
"id": "0e064997-4997-0e06-9749-060e9749060e",
"version": "Version value"
}