POST /deviceAppManagement/managedEBooks/{managedEBookId}/deviceStates
POST /deviceAppManagement/managedEBooks/{managedEBookId}/userStateSummary/{userInstallStateSummaryId}/deviceStates
POST https://graph.microsoft.com/v1.0/deviceAppManagement/managedEBooks/{managedEBookId}/deviceStates
Content-type: application/json
Content-length: 374
{
"@odata.type": "#microsoft.graph.deviceInstallState",
"deviceName": "Device Name value",
"deviceId": "Device Id value",
"lastSyncDateTime": "2017-01-01T00:02:49.3205976-08:00",
"installState": "installed",
"errorCode": "Error Code value",
"osVersion": "Os Version value",
"osDescription": "Os Description value",
"userName": "User Name value"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new DeviceInstallState
{
OdataType = "#microsoft.graph.deviceInstallState",
DeviceName = "Device Name value",
DeviceId = "Device Id value",
LastSyncDateTime = DateTimeOffset.Parse("2017-01-01T00:02:49.3205976-08:00"),
InstallState = InstallState.Installed,
ErrorCode = "Error Code value",
OsVersion = "Os Version value",
OsDescription = "Os Description value",
UserName = "User 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.ManagedEBooks["{managedEBook-id}"].DeviceStates.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
DeviceInstallState deviceInstallState = new DeviceInstallState();
deviceInstallState.setOdataType("#microsoft.graph.deviceInstallState");
deviceInstallState.setDeviceName("Device Name value");
deviceInstallState.setDeviceId("Device Id value");
OffsetDateTime lastSyncDateTime = OffsetDateTime.parse("2017-01-01T00:02:49.3205976-08:00");
deviceInstallState.setLastSyncDateTime(lastSyncDateTime);
deviceInstallState.setInstallState(InstallState.Installed);
deviceInstallState.setErrorCode("Error Code value");
deviceInstallState.setOsVersion("Os Version value");
deviceInstallState.setOsDescription("Os Description value");
deviceInstallState.setUserName("User Name value");
DeviceInstallState result = graphClient.deviceAppManagement().managedEBooks().byManagedEBookId("{managedEBook-id}").deviceStates().post(deviceInstallState);