Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Important: APIs under the /beta version in Microsoft Graph are subject to change which could break your applications. While Intune /beta APIs are supported by Microsoft, you should use these at your own discretion. In general, /beta APIs are not recommended for use in production applications. To determine whether an API is available in v1.0, use the Version selector.
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new mobileAppContentFile 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, DeviceManagementApps.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | DeviceManagementConfiguration.ReadWrite.All, DeviceManagementApps.ReadWrite.All |
HTTP Request
POST /deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files
Request headers
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Accept | application/json |
Request body
In the request body, supply a JSON representation for the mobileAppContentFile object.
The following table shows the properties that are required when you create the mobileAppContentFile.
Property | Type | Description |
---|---|---|
azureStorageUri | String | Indicates the Azure Storage URI that the file is uploaded to. Created by the service upon receiving a valid mobileAppContentFile. Read-only. This property is read-only. |
isCommitted | Boolean | A value indicating whether the file is committed. A committed app content file has been fully uploaded and validated by the Intune service. TRUE means that app content file is committed, FALSE means that app content file is not committed. Defaults to FALSE. Read-only. This property is read-only. |
id | String | The unique identifier for this mobileAppContentFile. This id is assigned during creation of the mobileAppContentFile. Read-only. This property is read-only. |
createdDateTime | DateTimeOffset | Indicates created date and time associated with app content file, in ISO 8601 format. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. This property is read-only. |
name | String | Indicates the name of the file. |
size | Int64 | Indicates the original size of the file, in bytes. |
sizeEncrypted | Int64 | Indicates the size of the file after encryption, in bytes. |
azureStorageUriExpirationDateTime | DateTimeOffset | Indicates the date and time when the Azure storage URI expires, in ISO 8601 format. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Read-only. This property is read-only. |
manifest | Binary | Indicates the manifest information, containing file metadata. |
uploadState | mobileAppContentFileUploadState | Indicates the state of the current upload request. Possible values are: success, transientError, error, unknown, azureStorageUriRequestSuccess, azureStorageUriRequestPending, azureStorageUriRequestFailed, azureStorageUriRequestTimedOut, azureStorageUriRenewalSuccess, azureStorageUriRenewalPending, azureStorageUriRenewalFailed, azureStorageUriRenewalTimedOut, commitFileSuccess, commitFilePending, commitFileFailed, commitFileTimedOut. Default value is success. This property is read-only. Possible values are: success , transientError , error , unknown , azureStorageUriRequestSuccess , azureStorageUriRequestPending , azureStorageUriRequestFailed , azureStorageUriRequestTimedOut , azureStorageUriRenewalSuccess , azureStorageUriRenewalPending , azureStorageUriRenewalFailed , azureStorageUriRenewalTimedOut , commitFileSuccess , commitFilePending , commitFileFailed , commitFileTimedOut . |
isFrameworkFile | Boolean | A value indicating whether the file is a framework file. To be deprecated. |
isDependency | Boolean | Indicates whether this content file is a dependency for the main content file. TRUE means that the content file is a dependency, FALSE means that the content file is not a dependency and is the main content file. Defaults to FALSE. |
Response
If successful, this method returns a 201 Created
response code and a mobileAppContentFile object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}/contentVersions/{mobileAppContentId}/files
Content-type: application/json
Content-length: 395
{
"@odata.type": "#microsoft.graph.mobileAppContentFile",
"azureStorageUri": "Azure Storage Uri value",
"isCommitted": true,
"name": "Name value",
"size": 4,
"sizeEncrypted": 13,
"azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
"manifest": "bWFuaWZlc3Q=",
"uploadState": "transientError",
"isFrameworkFile": true,
"isDependency": true
}
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: 503
{
"@odata.type": "#microsoft.graph.mobileAppContentFile",
"azureStorageUri": "Azure Storage Uri value",
"isCommitted": true,
"id": "eab2e29b-e29b-eab2-9be2-b2ea9be2b2ea",
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"name": "Name value",
"size": 4,
"sizeEncrypted": 13,
"azureStorageUriExpirationDateTime": "2017-01-01T00:00:08.4940464-08:00",
"manifest": "bWFuaWZlc3Q=",
"uploadState": "transientError",
"isFrameworkFile": true,
"isDependency": true
}