Import an app and upload to Intune
An Instant App import creates a package in your Robopack account. A separate tenant upload sends a package to Intune. Both steps can take time, so retain the returned IDs and check their state before proceeding.
You can start at the upload step if you already have a completed package. This guide uses PowerShell and the ROBOPACK_API_KEY environment variable from Getting started.
The POST requests below change data: importing creates a package in Robopack, and uploading creates the app in the selected Intune tenant. Review the app, version, package, and tenant before running each request. Use an appropriate test tenant for your first integration.
Select the app and version
Follow Search Instant Apps to review the app and its versions. Then prepare a header dictionary and enter its UUID:
if ([string]::IsNullOrWhiteSpace($env:ROBOPACK_API_KEY)) {
throw 'Set ROBOPACK_API_KEY to your API key.'
}
$headers = @{ 'X-API-Key' = $env:ROBOPACK_API_KEY; Accept = 'application/json' }
$appId = Read-Host 'Enter the id of the Instant App you reviewed'
Import the app
The following POST creates a new package using the app's latest version. Run it once after reviewing your selection:
$packageId = Invoke-RestMethod -Method Post -Headers $headers -ErrorAction Stop `
-Uri "https://api.robopack.com/v1/app/import/$appId"
$packageId
The response is a JSON UUID string, not an object with an id property. PowerShell parses it into the $packageId string.
If you need a reviewed version instead of the latest one, use its ID from the app detail response and replace the import request above with this request. Do not run both unless you intend to create two packages:
$versionId = Read-Host 'Enter the id of the app version you reviewed'
$packageId = Invoke-RestMethod -Method Post -Headers $headers -ErrorAction Stop `
-Uri "https://api.robopack.com/v1/app/import/${appId}?VersionId=$versionId"
The import reference also documents Version, ScriptTemplateId, and Scope. The import's Scope schema is an integer without documented enum values; do not reuse the separate flow-scope enum as an assumed mapping.
Check the package before using it
Read the package by the returned UUID:
$package = Invoke-RestMethod -Method Get -Headers $headers -ErrorAction Stop `
-Uri "https://api.robopack.com/v1/package/$packageId"
$package | Select-Object id, productName, manufacturer, productVersion, state, internalState
$package.errorDetails
$package.issues
Review the expected product and version, and use the documented numeric internalState enum to follow package processing:
internalState | Name |
|---|---|
0 | None |
1 | Pending |
2 | Running |
3 | Completed |
4 | Canceled |
5 | Error |
6 | Deleted |
7 | WaitingForContent |
8 | Deprecated |
Repeat the GET to observe progress. Proceed with a completed package after reviewing any reported errorDetails and issues. Do not upload a package still pending or running, or one reporting an error. See package details and PackageState.
For an existing package, use GET /v1/package to find it, review productName, manufacturer, and productVersion, and set $packageId to its id. Then perform the same detail check. The package list reference documents search, AppId filtering, and paging.
Select the connected tenant
The Intune upload requires an authorised tenant connection and Upload apps tenant permission. Review the API-user permission limitation and warning before changing permissions.
$tenants = @(Invoke-RestMethod -Method Get -Headers $headers -ErrorAction Stop `
-Uri 'https://api.robopack.com/v1/tenant')
$tenants | Select-Object id, displayName, defaultDomain, adminConsentGranted |
Format-Table -AutoSize
$tenantId = Read-Host 'Enter the id of the authorised tenant you reviewed'
Confirm the intended tenant by its display name and domain before continuing.
Start the Intune upload
This request uploads the package to the selected Intune tenant. It is a manual upload and will not be kept up to date automatically by Robopack. For ongoing patching, use a Robopatch flow.
With the reviewed package in Completed state, start an asynchronous upload:
if ($package.internalState -ne 3) {
throw 'Review a completed package before uploading to Intune.'
}
$uploadTask = Invoke-RestMethod -Method Post -Headers $headers -ErrorAction Stop `
-Uri "https://api.robopack.com/v1/tenant/${tenantId}/upload?packageId=$packageId&wait=false"
$uploadTask | Select-Object id, created, startedAt, completedAt, state, supportsProgress, progress
$uploadId = $uploadTask.id
The response is a task object. Retain its id as the upload task ID; it is separate from the package ID and tenant ID.
The tenant upload reference documents wait, which defaults to false. With wait=true, the request does not complete until the package is fully uploaded. For MSIX packages, uploadMsixAsWin32 defaults to true; set it to false if you intend to create a line-of-business app instead of wrapping it as Win32.
Check the upload task
Use the upload task ID to read its latest state:
$uploadTask = Invoke-RestMethod -Method Get -Headers $headers -ErrorAction Stop `
-Uri "https://api.robopack.com/v1/tenant/upload/$uploadId"
$uploadTask | Select-Object id, startedAt, completedAt, state, supportsProgress, progress
Repeat this GET to monitor the same task. state is nullable free text in the schema, and no set of success or failure values is defined. progress is nullable, and supportsProgress indicates whether the task supports progress reporting. Do not treat a missing progress value, the initial 200 response, or a populated completedAt alone as proof of a successful upload; review the task state and verify the app in Intune.
See upload status and V1TaskViewModel. The source does not specify a polling interval, rate limit, or idempotency behavior. If a POST times out or returns an unexpected response, check the account, package, or existing upload task before submitting it again.
Verify and choose the deployment model
Open the target tenant in Intune and verify the app's name, version, install settings, and detection behavior before assigning it. For a portal walkthrough of the same overall process, see Deploying Your First App.
A manual upload and a Robopatch flow are different workflows. Use Automating App Updates to plan patch groups and deployment waves, then consult the API reference for flow creation and deployment operations. Custom App Settings cannot currently be managed through the API; configure those in the portal as described in Known Limitations.