Etiqueta generada por el SDK de administración de la aplicación, que ayuda a relacionar las aplicaciones que se hospedan en el mismo dispositivo. No garantiza que las aplicaciones se relacionen en todas las condiciones. Heredado de managedAppRegistration.
Cero o más razones por las que se ha marcado el registro de una aplicación. E.g. app que se ejecuta en un dispositivo rooteado heredado de managedAppRegistration. Los valores posibles son none y rootedDevice.
userId
Cadena
Identificador de usuario al que pertenece este registro de la aplicación. Heredado de managedAppRegistration.
Si se ejecuta correctamente, este método devuelve un código de respuesta 201 Created y un objeto androidManagedAppRegistration en el cuerpo de la respuesta.
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://learn.microsoft.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();
# 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://learn.microsoft.com/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)
Aquí tiene un ejemplo de la respuesta. Nota: Es posible que el objeto de respuesta que aparezca aquí esté truncado para abreviar. Todas las propiedades se devolverán desde una llamada real.
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"
}