Compliance status of the policy report. Possible values are: unknown, notApplicable, compliant, remediated, nonCompliant, error, conflict, notAssigned.
POST https://graph.microsoft.com/v1.0/deviceAppManagement/mobileAppConfigurations/{managedDeviceMobileAppConfigurationId}/userStatuses
Content-type: application/json
Content-length: 306
{
"@odata.type": "#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus",
"userDisplayName": "User Display Name value",
"devicesCount": 12,
"status": "notApplicable",
"lastReportedDateTime": "2017-01-01T00:00:17.7769392-08:00",
"userPrincipalName": "User Principal Name value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new ManagedDeviceMobileAppConfigurationUserStatus
{
OdataType = "#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus",
UserDisplayName = "User Display Name value",
DevicesCount = 12,
Status = ComplianceStatus.NotApplicable,
LastReportedDateTime = DateTimeOffset.Parse("2017-01-01T00:00:17.7769392-08:00"),
UserPrincipalName = "User Principal Name 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.MobileAppConfigurations["{managedDeviceMobileAppConfiguration-id}"].UserStatuses.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc device-app-management mobile-app-configurations user-statuses create --managed-device-mobile-app-configuration-id {managedDeviceMobileAppConfiguration-id} --body '{\
"@odata.type": "#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus",\
"userDisplayName": "User Display Name value",\
"devicesCount": 12,\
"status": "notApplicable",\
"lastReportedDateTime": "2017-01-01T00:00:17.7769392-08:00",\
"userPrincipalName": "User Principal Name value"\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ManagedDeviceMobileAppConfigurationUserStatus();
$requestBody->setOdataType('#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus');
$requestBody->setUserDisplayName('User Display Name value');
$requestBody->setDevicesCount(12);
$requestBody->setStatus(new ComplianceStatus('notApplicable'));
$requestBody->setLastReportedDateTime(new \DateTime('2017-01-01T00:00:17.7769392-08:00'));
$requestBody->setUserPrincipalName('User Principal Name value');
$result = $graphServiceClient->deviceAppManagement()->mobileAppConfigurations()->byManagedDeviceMobileAppConfigurationId('managedDeviceMobileAppConfiguration-id')->userStatuses()->post($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(credentials, scopes)
request_body = ManagedDeviceMobileAppConfigurationUserStatus(
odata_type = "#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus",
user_display_name = "User Display Name value",
devices_count = 12,
status = ComplianceStatus.NotApplicable,
last_reported_date_time = "2017-01-01T00:00:17.7769392-08:00",
user_principal_name = "User Principal Name value",
)
result = await graph_client.device_app_management.mobile_app_configurations.by_managed_device_mobile_app_configuration_id('managedDeviceMobileAppConfiguration-id').user_statuses.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: 355
{
"@odata.type": "#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus",
"id": "44960944-0944-4496-4409-964444099644",
"userDisplayName": "User Display Name value",
"devicesCount": 12,
"status": "notApplicable",
"lastReportedDateTime": "2017-01-01T00:00:17.7769392-08:00",
"userPrincipalName": "User Principal Name value"
}