Depot mdmwindows
Registers the Windows settings routes.
This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.
GET /api/v1/mdm/windows/settings
Section titled “GET /api/v1/mdm/windows/settings”GETmdm:readtenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
getMdmWindowsSettings shows the Windows enrollment settings: the bound Entra app (never its secret), the device poll schedule, the Windows push (WNS) settings, and the URLs to register in the Entra app.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, MdmWindowsSettingsView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold mdm:read. |
500 | application/problem+json, ProblemDetails | No client context in request. |
200 response body
| Field | Type | Description |
|---|---|---|
discoveryUrl | string or null | |
enrollPollRetryCountrequired | integer | |
enrollPollRetryMinutesrequired | integer | |
entra | EntraAppView | entraAppView is the bound Entra app; the secret never leaves. |
entra.clientIdrequired | string | |
entra.hasSecretrequired | boolean | |
entra.owner | string or null | |
entra.publicIdrequired | string | |
entra.rowVersionrequired | integer | int64. |
entra.secretExpiresAt | string (date-time) or null | |
entra.staterequired | string | |
entra.tenantIdrequired | string | |
hasWnsClientSecretrequired | boolean | |
pollIntervalMinutesrequired | integer | |
rowVersionrequired | integer | int64. |
termsOfUseUrl | string or null | |
wnsClientId | string or null | |
wnsPackageFamilyName | string or null |
Request samples
Section titled “Request samples”# 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/settings' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# 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.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/mdm/windows/settings' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# 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.
import requests
url = "https://depot.example.com/api/v1/mdm/windows/settings"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// 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.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/mdm/windows/settings", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// 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.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/mdm/windows/settings";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// 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.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/mdm/windows/settings");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/mdm/windows/settings
Section titled “PUT /api/v1/mdm/windows/settings”PUTmdm:managetenant facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
putMdmWindowsSettings replaces the Windows enrollment settings.
Send the Entra app’s secret and the WNS client secret only to replace them; entra null removes the Entra binding.
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
enrollPollRetryCount | integer or null | |
enrollPollRetryMinutes | integer or null | |
entrarequired | any | Arbitrary JSON. |
pollIntervalMinutes | integer or null | |
rowVersionrequired | integer | int64. |
wnsClientIdrequired | string | |
wnsClientSecret | string or null | |
wnsPackageFamilyNamerequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, MdmWindowsSettingsView | Success. |
400 | application/problem+json, ProblemDetails | The request body is not valid JSON. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold mdm:manage. |
404 | application/problem+json, ProblemDetails | The Entra app was already removed. |
409 | application/problem+json, ProblemDetails | The Entra app changed since you loaded it. Reload and try again. |
500 | application/problem+json, ProblemDetails | No client context in request. |
200 response body
| Field | Type | Description |
|---|---|---|
discoveryUrl | string or null | |
enrollPollRetryCountrequired | integer | |
enrollPollRetryMinutesrequired | integer | |
entra | EntraAppView | entraAppView is the bound Entra app; the secret never leaves. |
entra.clientIdrequired | string | |
entra.hasSecretrequired | boolean | |
entra.owner | string or null | |
entra.publicIdrequired | string | |
entra.rowVersionrequired | integer | int64. |
entra.secretExpiresAt | string (date-time) or null | |
entra.staterequired | string | |
entra.tenantIdrequired | string | |
hasWnsClientSecretrequired | boolean | |
pollIntervalMinutesrequired | integer | |
rowVersionrequired | integer | int64. |
termsOfUseUrl | string or null | |
wnsClientId | string or null | |
wnsPackageFamilyName | string or null |
Request samples
Section titled “Request samples”# 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 PUT 'https://depot.example.com/api/v1/mdm/windows/settings' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "enrollPollRetryCount": 0, "enrollPollRetryMinutes": 0, "entra": "string", "pollIntervalMinutes": 0, "rowVersion": 0, "wnsClientId": "string", "wnsClientSecret": "string", "wnsPackageFamilyName": "string"}'# 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.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "enrollPollRetryCount": 0, "enrollPollRetryMinutes": 0, "entra": "string", "pollIntervalMinutes": 0, "rowVersion": 0, "wnsClientId": "string", "wnsClientSecret": "string", "wnsPackageFamilyName": "string"}'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/mdm/windows/settings' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# 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.
import requests
url = "https://depot.example.com/api/v1/mdm/windows/settings"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "enrollPollRetryCount": 0, "enrollPollRetryMinutes": 0, "entra": "string", "pollIntervalMinutes": 0, "rowVersion": 0, "wnsClientId": "string", "wnsClientSecret": "string", "wnsPackageFamilyName": "string",}
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// 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.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "enrollPollRetryCount": 0, "enrollPollRetryMinutes": 0, "entra": "string", "pollIntervalMinutes": 0, "rowVersion": 0, "wnsClientId": "string", "wnsClientSecret": "string", "wnsPackageFamilyName": "string"}`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/mdm/windows/settings", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// 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.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/mdm/windows/settings";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "enrollPollRetryCount": 0, "enrollPollRetryMinutes": 0, "entra": "string", "pollIntervalMinutes": 0, "rowVersion": 0, "wnsClientId": "string", "wnsClientSecret": "string", "wnsPackageFamilyName": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// 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.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "enrollPollRetryCount": 0, "enrollPollRetryMinutes": 0, "entra": "string", "pollIntervalMinutes": 0, "rowVersion": 0, "wnsClientId": "string", "wnsClientSecret": "string", "wnsPackageFamilyName": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/mdm/windows/settings");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());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.