Add a new VPN payload configuration to an existing profile

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Create Windows VPN policy payload

Request URL

https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/windowsvpnpolicy

Scope

MDMDeviceMgmt.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

profile_idstringMandatory

Unique identifier of the profile. Obtain from the Create Profile or Get Profiles response

- Request Body

application/json
JSON Object
Hide Sub-Attributes
connection_namestringMandatory

Connection Name. Default: VPN Configuration

connection_typeintegerMandatory

Connection Type. Default: 0

l2tpJSON ObjectOptional

L2Tp

Show Sub-Attributes
pptpJSON ObjectOptional

Pptp

Show Sub-Attributes
customsslJSON ObjectOptional

Customssl

Show Sub-Attributes
ikev2JSON ObjectOptional

Ikev2

Show Sub-Attributes
proxy_typeintegerOptional

Proxy Type. Default: 0

proxy_serverstringOptional

Proxy Server

proxy_server_portintegerOptional

Proxy Server Port. Default: 0

proxy_pac_urlstringOptional

Proxy Pac Url

vpn_typeintegerMandatory

Vpn Type. Default: 1

allowed_appsarrayOptional

Allowed Apps

custom_dataarrayOptional

Custom Data

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/v1/mdm/profiles/{profile_id}/payloads/windowsvpnpolicy \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"connection_name":"VPN Configuration","connection_type":"8","ikev2":{"authentication_method":0,"server_name":"127.0.0.1"},"allowed_apps":[],"vpn_type":2,"proxy_type":"0"}'

Sample Request Body

Add VPN payload to the profile (IKEv2 with Password)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "8",
    "ikev2": {
      "authentication_method": 0,
      "server_name": "127.0.0.1"
    },
    "allowed_apps": [],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (IKEv2 with Certificate)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "8",
    "ikev2": {
      "authentication_method": 2,
      "server_name": "127.0.0.1",
      "ca_certificate_id": "1"
    },
    "allowed_apps": [],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (PPTP with Password)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "1",
    "allowed_apps": [],
    "pptp": {
      "server_name": "127.0.0.1",
      "user_authentication": 0
    },
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (PPTP with Certificate)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "1",
    "allowed_apps": [],
    "pptp": {
      "server_name": "127.0.0.1",
      "ca_certificate_id": "1",
      "user_authentication": 2
    },
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (L2TP with Password)

Copied!
  {
    "connection_name": "VPN Configuration",
    "l2tp": {
      "server_name": "127.0.0.1",
      "user_authentication": 0
    },
    "connection_type": "0",
    "allowed_apps": [],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (L2TP with Shared Secret)

Copied!
  {
    "connection_name": "VPN Configuration",
    "l2tp": {
      "server_name": "127.0.0.1",
      "user_authentication": 1,
      "shared_secret": "xxxxx"
    },
    "connection_type": "0",
    "allowed_apps": [],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (L2TP with Certificate)

Copied!
  {
    "connection_name": "VPN Configuration",
    "l2tp": {
      "server_name": "127.0.0.1",
      "ca_certificate_id": "1",
      "user_authentication": 2
    },
    "connection_type": "0",
    "allowed_apps": [],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (F5 Access)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": 6,
    "customssl": {
      "server_name": "127.0.0.1",
      "identifier": "F5Networks.vpn.client_btcnfmkykcjs2",
      "user_authentication": 0
    },
    "allowed_apps": [],
    "custom_data": [
      {
        "custom_value": "true",
        "custom_key": "single-sign-on-credential"
      },
      {
        "custom_value": "true",
        "custom_key": "optimize-for-low-cost-network"
      }
    ],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (Pulse Secure)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": 6,
    "customssl": {
      "server_name": "127.0.0.1",
      "identifier": "951D7986.PulseSecureVPN_qzpvqh70t9a4p",
      "user_authentication": 0
    },
    "allowed_apps": [],
    "custom_data": [
      {
        "custom_value": "true",
        "custom_key": "isSingleSignOnCredential"
      },
      {
        "custom_value": "true",
        "custom_key": "optimizeForLowCostNetwork"
      },
      {
        "custom_value": "1",
        "custom_key": "preferredRealm"
      },
      {
        "custom_value": "1",
        "custom_key": "preferredRole"
      }
    ],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (SonicWall VPN)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": 6,
    "customssl": {
      "server_name": "127.0.0.1",
      "identifier": "SonicWALL.MobileConnect_e5kpm93dbe93j",
      "user_authentication": 0
    },
    "allowed_apps": [],
    "custom_data": [
      {
        "custom_value": "true",
        "custom_key": "SingleSignOn"
      },
      {
        "custom_value": "false",
        "custom_key": "PacketCapture"
      },
      {
        "custom_value": "false",
        "custom_key": "WindowsAuthUI"
      }
    ],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (CheckPoint)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": 6,
    "customssl": {
      "server_name": "127.0.0.1",
      "identifier": "B4D42709.CheckPointVPN_wz4qkf3wxpc74",
      "user_authentication": 0
    },
    "allowed_apps": [],
    "custom_data": [
      {
        "custom_value": "true",
        "custom_key": "sso"
      },
      {
        "custom_value": "true",
        "custom_key": "lowcost"
      }
    ],
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (Per-App VPN)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "1",
    "allowed_apps": [
      {
        "group_display_name": "Alarms and clock",
        "is_system_app": false,
        "app_id": "1"
      }
    ],
    "pptp": {
      "server_name": "127.0.0.1",
      "user_authentication": 0
    },
    "vpn_type": 2,
    "proxy_type": "0"
  }
                
Show full

Add VPN payload to the profile (With Proxy Automatic)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "1",
    "allowed_apps": [],
    "pptp": {
      "server_name": "127.0.0.1",
      "user_authentication": 0
    },
    "proxy_pac_url": "127.0.0.1:3128",
    "vpn_type": 2,
    "proxy_type": "2"
  }
                
Show full

Add VPN payload to the profile (With Proxy Manual)

Copied!
  {
    "connection_name": "VPN Configuration",
    "connection_type": "1",
    "allowed_apps": [],
    "proxy_server": "127.0.0.1",
    "pptp": {
      "server_name": "127.0.0.1",
      "user_authentication": 0
    },
    "proxy_server_port": "3128",
    "vpn_type": 2,
    "proxy_type": "1"
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
payload_idlong

Unique identifier for the created payload item

connection_namestring

Connection Name. Default: VPN Configuration

connection_typeinteger

Connection Type. Default: 0

send_all_nw_trafficboolean

Send All Nw Traffic. Default: false

enable_vpn_on_demandboolean

Enable Vpn On Demand. Default: false

l2tpJSON Object

L2Tp

Show Sub-Attributes
pptpJSON Object

Pptp

Show Sub-Attributes
customsslJSON Object

Customssl

Show Sub-Attributes
ikev2JSON Object

Ikev2

Show Sub-Attributes
proxy_typeinteger

Proxy Type. Default: 0

proxy_serverstring

Proxy Server

proxy_server_portinteger

Proxy Server Port. Default: 0

proxy_user_namestring

Proxy User Name

proxy_pac_urlstring

Proxy Pac Url

vpn_typeinteger

Vpn Type. Default: 1

provider_typeinteger

Provider Type. Default: 1

vpnuuidstring

Vpnuuid

allowed_appsarray

Allowed Apps

custom_dataarray

Custom Data

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

VPN payload successfully added

Copied!
  {
    "provider_type": "1",
    "payload_id": "9007199254741295",
    "connection_type": "6",
    "proxy_user_name": "",
    "proxy_server": "127.0.0.1",
    "allowed_apps": [
      {
        "group_display_name": "Alarms and clock",
        "is_system_app": false,
        "app_id": "1"
      }
    ],
    "enable_vpn_on_demand": false,
    "vpnuuid": "",
    "proxy_server_port": "3128",
    "vpn_type": "2",
    "connection_name": "VPN Configuration",
    "send_all_nw_traffic": false,
    "customssl": {
      "certificate_id": "-1",
      "identifier": "951D7986.PulseSecureVPN_qzpvqh70t9a4p",
      "server_name": "127.0.0.1",
      "user_authentication": "0",
      "provider_identifier": "",
      "account": ""
    },
    "proxy_pac_url": "",
    "custom_data": [
      {
        "custom_value": "1",
        "custom_key": "preferredRealm"
      },
      {
        "custom_value": "true",
        "custom_key": "optimizeForLowCostNetwork"
      },
      {
        "custom_value": "1",
        "custom_key": "preferredRole"
      },
      {
        "custom_value": "true",
        "custom_key": "isSingleSignOnCredential"
      }
    ],
    "proxy_type": "1"
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.