Skip to content

Depot mdmenrollagent

Registers the enroll-through-the-agent action.

This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.

POST /api/v1/endpoints/{agentID}/mdm/enroll

Section titled “POST /api/v1/endpoints/{agentID}/mdm/enroll”

POSTmdm:enrolltenant facehosteditmspremote

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

enrollMdmViaAgent asks a Windows PC’s Outpost agent to enroll the PC in Windows MDM.

The agent fetches a single-use enrollment ticket and registers the device with Outpost’s Windows MDM, so the device keeps its one endpoint record. Windows enrolls it only while someone is signed in; the mdm_enroll command’s result says whether it did.

NameInTypeRequiredDescription
agentIDpathstringYesA uuid.
StatusBodyDescription
202application/json, MdmEnrollAgentViewAccepted.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsNo client context in request.
503application/problem+json, ProblemDetailsThe request was refused.

202 response body

FieldTypeDescription
commandIdrequiredstring
deliveredrequiredboolean
detailrequiredstring
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/endpoints/<agentID>/mdm/enroll' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETmdm:readtenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

listMdmBulkTokens lists the Windows bulk enrollment tokens, newest first.

Revoked tokens are included with includeRevoked=true.

NameInTypeRequiredDescription
includeRevokedquerystringNo
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
StatusBodyDescription
200application/json, PagedResultMdmBulkTokenViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:read.
500application/problem+json, ProblemDetailsNo client store in request context.

200 response body

FieldTypeDescription
itemsrequiredarray of MdmBulkTokenView
items[].createdAtrequiredstring (date-time)
items[].createdByUserIdstring or null
items[].expiresAtrequiredstring (date-time)
items[].lastUsedAtstring (date-time) or null
items[].maxUsesrequiredinteger
items[].namerequiredstring
items[].publicIdrequiredstring
items[].revokedAtstring (date-time) or null
items[].revokedByUserIdstring or null
items[].rowVersionrequiredinteger

int64.

items[].secretstring or null
items[].siteIdstring or null
items[].statusrequiredstring
items[].upnrequiredstring
items[].usedCountrequiredinteger
pagerequiredinteger
pageSizerequiredinteger
totalrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/mdm/windows/bulk-tokens?includeRevoked=<includeRevoked>&page=0&pageSize=0' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTmdm:enrolltenant facehosteditmspremote

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

createMdmBulkToken creates a Windows bulk enrollment token: a name, an optional site the PCs it enrolls join, an optional cap on how many PCs it enrolls (0 or absent: no cap) and how many days it lasts (default 30, at most 365).

The response carries the token’s secret and user name once, for scripted enrollment; the provisioning package route embeds them.

Required, sent as application/json.

FieldTypeDescription
expiresInDaysinteger or null
maxUsesinteger or null
namerequiredstring
siteIdstring or null
StatusBodyDescription
201application/json, MdmBulkTokenViewCreated.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
404application/problem+json, ProblemDetailsBulk enrollment token not found.
409application/problem+json, ProblemDetailsThe bulk enrollment token could not be created.
500application/problem+json, ProblemDetailsNo client store in request context.

201 response body

FieldTypeDescription
createdAtrequiredstring (date-time)
createdByUserIdstring or null
expiresAtrequiredstring (date-time)
lastUsedAtstring (date-time) or null
maxUsesrequiredinteger
namerequiredstring
publicIdrequiredstring
revokedAtstring (date-time) or null
revokedByUserIdstring or null
rowVersionrequiredinteger

int64.

secretstring or null
siteIdstring or null
statusrequiredstring
upnrequiredstring
usedCountrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/mdm/windows/bulk-tokens' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"expiresInDays": 0,
"maxUses": 0,
"name": "string",
"siteId": "string"
}'

POST /api/v1/mdm/windows/bulk-tokens/{publicId}/revoke

Section titled “POST /api/v1/mdm/windows/bulk-tokens/{publicId}/revoke”

POSTmdm:enrolltenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

revokeMdmBulkToken revokes a bulk enrollment token: no further PC enrolls with it or with any provisioning package that carries it.

PCs it already enrolled stay enrolled. rowVersion, when sent, must be the token’s current one.

NameInTypeRequiredDescription
publicIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
rowVersioninteger or null

int64.

StatusBodyDescription
200application/json, MdmBulkTokenViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe token is already revoked or was changed by someone else. Reload and try again.
500application/problem+json, ProblemDetailsNo client store in request context.

200 response body

FieldTypeDescription
createdAtrequiredstring (date-time)
createdByUserIdstring or null
expiresAtrequiredstring (date-time)
lastUsedAtstring (date-time) or null
maxUsesrequiredinteger
namerequiredstring
publicIdrequiredstring
revokedAtstring (date-time) or null
revokedByUserIdstring or null
rowVersionrequiredinteger

int64.

secretstring or null
siteIdstring or null
statusrequiredstring
upnrequiredstring
usedCountrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/mdm/windows/bulk-tokens/<publicId>/revoke' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"rowVersion": 0
}'

POSTmdm:enrolltenant facehosteditmspremote

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

enrollMdmViaAgents asks the Outpost agent on each listed Windows PC (up to 500) to enroll it in Windows device management, as the single-device action does.

Each PC gets its own result: delivered (the agent took it now), queued (on reconnect), refused with a reason (not Windows, no agent, already enrolled), not_found or failed. The request succeeds whatever the mix. Delivered is not enrolled: Windows enrolls a PC only while someone is signed in to it, and each command’s result says whether it did.

Required, sent as application/json.

FieldTypeDescription
agentIdsrequiredarray of string
StatusBodyDescription
200application/json, MdmEnrollAgentsViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
500application/problem+json, ProblemDetailsNo client store in request context.

200 response body

FieldTypeDescription
resultsrequiredarray of MdmEnrollAgentResult
results[].agentIdrequiredstring
results[].commandIdstring
results[].detailstring
results[].reasonstring
results[].statusrequiredstring
sentrequiredinteger
skippedrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/mdm/windows/enroll-agents' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"agentIds": [
"string"
]
}'

POSTmdm:enrolltenant facehosteditmspremotedownloadNot fully resolved

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

What this page does not know
  • response

These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.

Source: [object Object]

generateMdmPpkg builds a Windows provisioning package (.ppkg) for a live bulk enrollment token, optionally joining Wi-Fi networks (open, WPA2 or WPA3 personal) and trusting root certificates first, and returns it as a download.

The package is not signed: Windows asks once whether it comes from a trusted source, and Install-ProvisioningPackage -QuietInstall, run elevated, applies it without asking.

Required, sent as application/json.

FieldTypeDescription
rootCertificatesPemrequiredstring
tokenIdrequiredstring
wifirequiredarray of MdmPpkgWiFi
wifi[].hiddenrequiredboolean
wifi[].passphraserequiredstring
wifi[].securityrequiredstring
wifi[].ssidrequiredstring
StatusBodyDescription
200application/octet-stream, string (binary)Success. The body shape was not resolved; see x-outpost-unresolved.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold mdm:enroll.
500application/problem+json, ProblemDetailsNo client store in request context.
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/mdm/windows/ppkg' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"rootCertificatesPem": "string",
"tokenId": "string",
"wifi": [
{
"hidden": false,
"passphrase": "string",
"security": "string",
"ssid": "string"
}
]
}'

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.