Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new iosUpdateDeviceStatus object.
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
✅ |
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type |
Permissions (from least to most privileged) |
Delegated (work or school account) |
DeviceManagementConfiguration.ReadWrite.All |
Delegated (personal Microsoft account) |
Not supported. |
Application |
DeviceManagementConfiguration.ReadWrite.All |
HTTP Request
POST /deviceManagement/iosUpdateStatuses
Request body
In the request body, supply a JSON representation for the iosUpdateDeviceStatus object.
The following table shows the properties that are required when you create the iosUpdateDeviceStatus.
Property |
Type |
Description |
id |
String |
Key of the entity. |
installStatus |
iosUpdatesInstallStatus |
The installation status of the policy report. Possible values are: success , available , idle , unknown , downloading , downloadFailed , downloadRequiresComputer , downloadInsufficientSpace , downloadInsufficientPower , downloadInsufficientNetwork , installing , installInsufficientSpace , installInsufficientPower , installPhoneCallInProgress , installFailed , notSupportedOperation , sharedDeviceUserLoggedInError , deviceOsHigherThanDesiredOsVersion . |
osVersion |
String |
The device version that is being reported. |
deviceId |
String |
The device id that is being reported. |
userId |
String |
The User id that is being reported. |
deviceDisplayName |
String |
Device name of the DevicePolicyStatus. |
userName |
String |
The User Name that is being reported |
deviceModel |
String |
The device model that is being reported |
complianceGracePeriodExpirationDateTime |
DateTimeOffset |
The DateTime when device compliance grace period expires |
status |
complianceStatus |
Compliance status of the policy report. Possible values are: unknown , notApplicable , compliant , remediated , nonCompliant , error , conflict , notAssigned . |
lastReportedDateTime |
DateTimeOffset |
Last modified date time of the policy report. |
userPrincipalName |
String |
UserPrincipalName. |
Response
If successful, this method returns a 201 Created
response code and a iosUpdateDeviceStatus object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/v1.0/deviceManagement/iosUpdateStatuses
Content-type: application/json
Content-length: 552
{
"@odata.type": "#microsoft.graph.iosUpdateDeviceStatus",
"installStatus": "available",
"osVersion": "Os Version value",
"deviceId": "Device Id value",
"userId": "User Id value",
"deviceDisplayName": "Device Display Name value",
"userName": "User Name value",
"deviceModel": "Device Model value",
"complianceGracePeriodExpirationDateTime": "2016-12-31T23:56:44.951111-08:00",
"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 IosUpdateDeviceStatus
{
OdataType = "#microsoft.graph.iosUpdateDeviceStatus",
InstallStatus = IosUpdatesInstallStatus.Available,
OsVersion = "Os Version value",
DeviceId = "Device Id value",
UserId = "User Id value",
DeviceDisplayName = "Device Display Name value",
UserName = "User Name value",
DeviceModel = "Device Model value",
ComplianceGracePeriodExpirationDateTime = DateTimeOffset.Parse("2016-12-31T23:56:44.951111-08:00"),
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.DeviceManagement.IosUpdateStatuses.PostAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
"time"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewIosUpdateDeviceStatus()
installStatus := graphmodels.AVAILABLE_IOSUPDATESINSTALLSTATUS
requestBody.SetInstallStatus(&installStatus)
osVersion := "Os Version value"
requestBody.SetOsVersion(&osVersion)
deviceId := "Device Id value"
requestBody.SetDeviceId(&deviceId)
userId := "User Id value"
requestBody.SetUserId(&userId)
deviceDisplayName := "Device Display Name value"
requestBody.SetDeviceDisplayName(&deviceDisplayName)
userName := "User Name value"
requestBody.SetUserName(&userName)
deviceModel := "Device Model value"
requestBody.SetDeviceModel(&deviceModel)
complianceGracePeriodExpirationDateTime , err := time.Parse(time.RFC3339, "2016-12-31T23:56:44.951111-08:00")
requestBody.SetComplianceGracePeriodExpirationDateTime(&complianceGracePeriodExpirationDateTime)
status := graphmodels.NOTAPPLICABLE_COMPLIANCESTATUS
requestBody.SetStatus(&status)
lastReportedDateTime , err := time.Parse(time.RFC3339, "2017-01-01T00:00:17.7769392-08:00")
requestBody.SetLastReportedDateTime(&lastReportedDateTime)
userPrincipalName := "User Principal Name value"
requestBody.SetUserPrincipalName(&userPrincipalName)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
iosUpdateStatuses, err := graphClient.DeviceManagement().IosUpdateStatuses().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
IosUpdateDeviceStatus iosUpdateDeviceStatus = new IosUpdateDeviceStatus();
iosUpdateDeviceStatus.setOdataType("#microsoft.graph.iosUpdateDeviceStatus");
iosUpdateDeviceStatus.setInstallStatus(IosUpdatesInstallStatus.Available);
iosUpdateDeviceStatus.setOsVersion("Os Version value");
iosUpdateDeviceStatus.setDeviceId("Device Id value");
iosUpdateDeviceStatus.setUserId("User Id value");
iosUpdateDeviceStatus.setDeviceDisplayName("Device Display Name value");
iosUpdateDeviceStatus.setUserName("User Name value");
iosUpdateDeviceStatus.setDeviceModel("Device Model value");
OffsetDateTime complianceGracePeriodExpirationDateTime = OffsetDateTime.parse("2016-12-31T23:56:44.951111-08:00");
iosUpdateDeviceStatus.setComplianceGracePeriodExpirationDateTime(complianceGracePeriodExpirationDateTime);
iosUpdateDeviceStatus.setStatus(ComplianceStatus.NotApplicable);
OffsetDateTime lastReportedDateTime = OffsetDateTime.parse("2017-01-01T00:00:17.7769392-08:00");
iosUpdateDeviceStatus.setLastReportedDateTime(lastReportedDateTime);
iosUpdateDeviceStatus.setUserPrincipalName("User Principal Name value");
IosUpdateDeviceStatus result = graphClient.deviceManagement().iosUpdateStatuses().post(iosUpdateDeviceStatus);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const iosUpdateDeviceStatus = {
'@odata.type': '#microsoft.graph.iosUpdateDeviceStatus',
installStatus: 'available',
osVersion: 'Os Version value',
deviceId: 'Device Id value',
userId: 'User Id value',
deviceDisplayName: 'Device Display Name value',
userName: 'User Name value',
deviceModel: 'Device Model value',
complianceGracePeriodExpirationDateTime: '2016-12-31T23:56:44.951111-08:00',
status: 'notApplicable',
lastReportedDateTime: '2017-01-01T00:00:17.7769392-08:00',
userPrincipalName: 'User Principal Name value'
};
await client.api('/deviceManagement/iosUpdateStatuses')
.post(iosUpdateDeviceStatus);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\IosUpdateDeviceStatus;
use Microsoft\Graph\Generated\Models\IosUpdatesInstallStatus;
use Microsoft\Graph\Generated\Models\ComplianceStatus;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new IosUpdateDeviceStatus();
$requestBody->setOdataType('#microsoft.graph.iosUpdateDeviceStatus');
$requestBody->setInstallStatus(new IosUpdatesInstallStatus('available'));
$requestBody->setOsVersion('Os Version value');
$requestBody->setDeviceId('Device Id value');
$requestBody->setUserId('User Id value');
$requestBody->setDeviceDisplayName('Device Display Name value');
$requestBody->setUserName('User Name value');
$requestBody->setDeviceModel('Device Model value');
$requestBody->setComplianceGracePeriodExpirationDateTime(new \DateTime('2016-12-31T23:56:44.951111-08:00'));
$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->deviceManagement()->iosUpdateStatuses()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.DeviceManagement.Administration
$params = @{
"@odata.type" = "#microsoft.graph.iosUpdateDeviceStatus"
installStatus = "available"
osVersion = "Os Version value"
deviceId = "Device Id value"
userId = "User Id value"
deviceDisplayName = "Device Display Name value"
userName = "User Name value"
deviceModel = "Device Model value"
complianceGracePeriodExpirationDateTime = [System.DateTime]::Parse("2016-12-31T23:56:44.951111-08:00")
status = "notApplicable"
lastReportedDateTime = [System.DateTime]::Parse("2017-01-01T00:00:17.7769392-08:00")
userPrincipalName = "User Principal Name value"
}
New-MgDeviceManagementIoUpdateStatus -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.ios_update_device_status import IosUpdateDeviceStatus
from msgraph.generated.models.ios_updates_install_status import IosUpdatesInstallStatus
from msgraph.generated.models.compliance_status import ComplianceStatus
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = IosUpdateDeviceStatus(
odata_type = "#microsoft.graph.iosUpdateDeviceStatus",
install_status = IosUpdatesInstallStatus.Available,
os_version = "Os Version value",
device_id = "Device Id value",
user_id = "User Id value",
device_display_name = "Device Display Name value",
user_name = "User Name value",
device_model = "Device Model value",
compliance_grace_period_expiration_date_time = "2016-12-31T23:56:44.951111-08:00",
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_management.ios_update_statuses.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
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: 601
{
"@odata.type": "#microsoft.graph.iosUpdateDeviceStatus",
"id": "63a79499-9499-63a7-9994-a7639994a763",
"installStatus": "available",
"osVersion": "Os Version value",
"deviceId": "Device Id value",
"userId": "User Id value",
"deviceDisplayName": "Device Display Name value",
"userName": "User Name value",
"deviceModel": "Device Model value",
"complianceGracePeriodExpirationDateTime": "2016-12-31T23:56:44.951111-08:00",
"status": "notApplicable",
"lastReportedDateTime": "2017-01-01T00:00:17.7769392-08:00",
"userPrincipalName": "User Principal Name value"
}