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://video2.skills-academy.com/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();
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"
}
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.