Conditional Access Policy
Conditional Access Policy API for ManageEngine ID360
Attribute
eg: ((3 and 2) and 1)
- ipaddress
- geolocation
- time
- in
- not_in
- allow
- deny
- ComputerDevices
- NPS
- IIS
- SSOApplications
- IdentityServer
-
ComputerDevices :
- ComputerDevices
-
NPS :
- NPS_VPN
-
IIS :
- IIS
-
SSOApplications :
- SSOApplications
-
IdentityServer :
- Login
- SensitiveActions
Available actions for ComputerDevices:
- InteractiveLogon
- MachineUnlock
- RDP
- SSH
- UAC
- Sudo
- delete_users
- delete_groups
- delete_directories
- delete_applications
- admin_dashboard_enrollment
- native
- secure_link
- allow
- deny
- user
- admin
- minutes
- hours
- days
Note: In the case of Fortigate, the Vendor ID is 12356. Refer to your VPN provider's documentation to get the Vendor ID.
- vendor
- standard
- string
- integer
- enum
- ipv4address
- ipv6address
- always
- after_failed_attempts
- primary
- select
- input
- primary
- select
- input
{
"id": "2000000000001",
"name": "Policy 01",
"description": "Test Policy",
"is_enabled": true,
"user_assignments": {
"user_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616"
],
"users_count": 2,
"groups_count": 1
},
"access_conditions": {
"criteria_expression": "((3 and 2) and 1)",
"conditions": [
{
"sequence_number": 1,
"factor_type": "ipaddress",
"comparator": "in",
"factor_configs": [
"2000000092642",
"2000000092643"
],
"include_all_trusted_sources": true
}
]
},
"access_type": "allow",
"endpoints": [
"ComputerDevices",
"NPS",
"IIS",
"IdentityServer"
],
"endpoints_settings": [
{
"endpoint": "ComputerDevices",
"type": "ComputerDevices",
"device_assignment": {
"device_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616",
"2000000092617"
],
"all_devices_group_selected": false
},
"app_assignment": {
"app_ids": [
"2000000092642"
]
},
"actions": [
"InteractiveLogon",
"RDP"
],
"primary_authentication": {
"is_passwordless_enabled": true,
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1
}
]
},
"secondary_authentication": {
"is_mfa_enabled": true,
"no_of_required_factors": 1,
"authn_mode": "native",
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1,
"is_mandatory": true
}
]
},
"advanced_settings": {
"mfa_timeout": 5,
"mfa_unenrolled_action": "allow",
"mfa_trust": {
"is_enabled": true,
"initiator_type": "user",
"duration": {
"value": 30,
"unit": "minutes"
}
},
"radius_response_config": {
"vendor_id": "12356",
"attributes_list": [
{
"type": "vendor",
"number": 12,
"data_type": "string",
"value": "12"
}
]
},
"notification_template_id": 200000012544,
"notification_template": {
"id": 200000012544,
"name": "Email Verification"
}
}
}
],
"advanced_settings": {
"is_captcha_enabled": true,
"captcha_frequency_type": "always",
"captcha_failed_attempts_threshold": 3,
"is_backup_codes_enabled": false,
"emailaddress_selection_mode": "primary",
"mobileno_selection_mode": "select"
}
}
List Conditional Access Policies
Retrieves a list of conditional access policies.
OAuth Scope : id360.notification_template.read,id360.notification_template.all
Query Parameters
eg: id,name,description,is_enabled,assignment,access_type,endpoint_settings,advanced_settings
eg: 50
eg: name eq "Policy 01"
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies")
.get()
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/api/v1/protection/conditional-access-policies", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"data": [
{
"id": "2000000093001",
"is_enabled": true,
"is_default_policy": true,
"display_name": "Global Policy",
"description": "",
"priority": 2,
"endpoints": [
"All Endpoints"
],
"access_type": "allow",
"is_agent_required": true,
"last_modified_time": "2025-07-08T06:09:47.123Z",
"last_modified_user": "john@mydomain.com"
},
{
"id": "2000000093002",
"is_enabled": true,
"is_default_policy": false,
"display_name": "Policy 01",
"description": "",
"priority": 1,
"user_assignments": {
"users_count": 5,
"groups_count": 2
},
"endpoints": [
"ComputerDevices",
"NPS"
],
"access_type": "allow",
"is_agent_required": true,
"last_modified_time": "2025-07-08T06:09:47.123Z",
"last_modified_user": "jane@mydomain.com"
}
],
"meta": {
"start_index": 1,
"limit": 100,
"total_no_of_objects": 1
}
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Create a Conditional Access Policy
Create a conditional access policy.
OAuth Scope : id360.conditional_access_policy.create,id360.conditional_access_policy.all
Arguments
eg: ((3 and 2) and 1)
- ipaddress
- geolocation
- time
- in
- not_in
- allow
- deny
- ComputerDevices
- NPS
- IIS
- SSOApplications
- IdentityServer
-
ComputerDevices :
- ComputerDevices
-
NPS :
- NPS_VPN
-
IIS :
- IIS
-
SSOApplications :
- SSOApplications
-
IdentityServer :
- Login
- SensitiveActions
Available actions for ComputerDevices:
- InteractiveLogon
- MachineUnlock
- RDP
- SSH
- UAC
- Sudo
- delete_users
- delete_groups
- delete_directories
- delete_applications
- admin_dashboard_enrollment
- native
- secure_link
- allow
- deny
- user
- admin
- minutes
- hours
- days
Note: In the case of Fortigate, the Vendor ID is 12356. Refer to your VPN provider's documentation to get the Vendor ID.
- vendor
- standard
- string
- integer
- enum
- ipv4address
- ipv6address
- always
- after_failed_attempts
- primary
- select
- input
- primary
- select
- input
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies")
.post(body)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v1/protection/conditional-access-policies", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"name": "Policy 01",
"description": "Test Policy",
"is_enabled": true,
"user_assignments": {
"user_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616"
]
},
"access_conditions": {
"criteria_expression": "((3 and 2) and 1)",
"conditions": [
{
"sequence_number": 1,
"factor_type": "ipaddress",
"comparator": "in",
"factor_configs": [
"2000000092642",
"2000000092643"
],
"include_all_trusted_sources": true
}
]
},
"access_type": "allow",
"endpoints_settings": [
{
"endpoint": "ComputerDevices",
"type": "ComputerDevices",
"device_assignment": {
"device_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616",
"2000000092617"
],
"all_devices_group_selected": false
},
"app_assignment": {
"app_ids": [
"2000000092642"
]
},
"actions": [
"InteractiveLogon",
"RDP"
],
"primary_authentication": {
"is_passwordless_enabled": true,
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1
}
]
},
"secondary_authentication": {
"is_mfa_enabled": true,
"no_of_required_factors": 1,
"authn_mode": "native",
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1,
"is_mandatory": true
}
]
},
"advanced_settings": {
"mfa_timeout": 5,
"mfa_unenrolled_action": "allow",
"mfa_trust": {
"is_enabled": true,
"initiator_type": "user",
"duration": {
"value": 30,
"unit": "minutes"
}
},
"radius_response_config": {
"vendor_id": "12356",
"attributes_list": [
{
"type": "vendor",
"number": 12,
"data_type": "string",
"value": "12"
}
]
},
"notification_template_id": 200000012544
}
}
],
"advanced_settings": {
"is_captcha_enabled": true,
"captcha_frequency_type": "always",
"captcha_failed_attempts_threshold": 3,
"is_backup_codes_enabled": false,
"emailaddress_selection_mode": "primary",
"mobileno_selection_mode": "select"
}
}
{
"id": "2000000000001",
"name": "Policy 01",
"description": "Test Policy",
"is_enabled": true,
"user_assignments": {
"user_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616"
],
"users_count": 2,
"groups_count": 1
},
"access_conditions": {
"criteria_expression": "((3 and 2) and 1)",
"conditions": [
{
"sequence_number": 1,
"factor_type": "ipaddress",
"comparator": "in",
"factor_configs": [
"2000000092642",
"2000000092643"
],
"include_all_trusted_sources": true
}
]
},
"access_type": "allow",
"endpoints": [
"ComputerDevices",
"NPS",
"IIS",
"IdentityServer"
],
"endpoints_settings": [
{
"endpoint": "ComputerDevices",
"type": "ComputerDevices",
"device_assignment": {
"device_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616",
"2000000092617"
],
"all_devices_group_selected": false
},
"app_assignment": {
"app_ids": [
"2000000092642"
]
},
"actions": [
"InteractiveLogon",
"RDP"
],
"primary_authentication": {
"is_passwordless_enabled": true,
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1
}
]
},
"secondary_authentication": {
"is_mfa_enabled": true,
"no_of_required_factors": 1,
"authn_mode": "native",
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1,
"is_mandatory": true
}
]
}
}
]
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Bulk Delete Conditional Access Policies
Deletes multiple conditional access policies by IDs.
OAuth Scope : id360.conditional_access_policy.delete,id360.conditional_access_policy.all'
Query Parameters
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies?ids=2000000000001,2000000000002"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies?ids=2000000000001%2C2000000000002")
.delete(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies?ids=2000000000001%2C2000000000002', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/api/v1/protection/conditional-access-policies?ids=2000000000001%2C2000000000002", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies?ids=2000000000001%2C2000000000002",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url 'https://id360.manageengine.com/api/v1/protection/conditional-access-policies?ids=2000000000001%2C2000000000002' \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
[
{
"resource_id": "2000000000001",
"status": 204
},
{
"resource_id": "2000000000002",
"status": 404,
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
]
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Get a Conditional Access Policy
Retrieve a specific conditional access policy by ID.
OAuth Scope : id360.conditional_access_policy.read,id360.conditional_access_policy.all
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001")
.get()
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/api/v1/protection/conditional-access-policies/2000000000001", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/2000000000001",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001 \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"id": "2000000000001",
"name": "Policy 01",
"description": "Test Policy",
"is_enabled": true,
"user_assignments": {
"user_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616"
],
"users_count": 2,
"groups_count": 1
},
"access_conditions": {
"criteria_expression": "((3 and 2) and 1)",
"conditions": [
{
"sequence_number": 1,
"factor_type": "ipaddress",
"comparator": "in",
"factor_configs": [
"2000000092642",
"2000000092643"
],
"include_all_trusted_sources": true
}
]
},
"access_type": "allow",
"endpoints": [
"ComputerDevices",
"NPS",
"IIS",
"IdentityServer"
],
"endpoints_settings": [
{
"endpoint": "ComputerDevices",
"type": "ComputerDevices",
"device_assignment": {
"device_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616",
"2000000092617"
],
"all_devices_group_selected": false
},
"app_assignment": {
"app_ids": [
"2000000092642"
]
},
"actions": [
"InteractiveLogon",
"RDP"
],
"primary_authentication": {
"is_passwordless_enabled": true,
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1
}
]
},
"secondary_authentication": {
"is_mfa_enabled": true,
"no_of_required_factors": 1,
"authn_mode": "native",
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1,
"is_mandatory": true
}
]
}
}
]
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Update a Conditional Access Policy
Update an existing conditional access policy by ID.
OAuth Scope : id360.conditional_access_policy.update,id360.conditional_access_policy.all'
Arguments
eg: ((3 and 2) and 1)
- ipaddress
- geolocation
- time
- in
- not_in
- allow
- deny
- ComputerDevices
- NPS
- IIS
- SSOApplications
- IdentityServer
-
ComputerDevices :
- ComputerDevices
-
NPS :
- NPS_VPN
-
IIS :
- IIS
-
SSOApplications :
- SSOApplications
-
IdentityServer :
- Login
- SensitiveActions
Available actions for ComputerDevices:
- InteractiveLogon
- MachineUnlock
- RDP
- SSH
- UAC
- Sudo
- delete_users
- delete_groups
- delete_directories
- delete_applications
- admin_dashboard_enrollment
- native
- secure_link
- allow
- deny
- user
- admin
- minutes
- hours
- days
Note: In the case of Fortigate, the Vendor ID is 12356. Refer to your VPN provider's documentation to get the Vendor ID.
- vendor
- standard
- string
- integer
- enum
- ipv4address
- ipv6address
- always
- after_failed_attempts
- primary
- select
- input
- primary
- select
- input
parameters_data='{"name":"Policy 01","description":"Test Policy","is_enabled":true,"user_assignments":{"user_ids":["2000000092642","2000000092643"],"group_ids":["2000000092616"]},"access_conditions":{"criteria_expression":"((3 and 2) and 1)","conditions":[{"sequence_number":1,"factor_type":"ipaddress","comparator":"in","factor_configs":["2000000092642","2000000092643"],"include_all_trusted_sources":true}]},"access_type":"allow","endpoints_settings":[{"endpoint":"ComputerDevices","type":"ComputerDevices","device_assignment":{"device_ids":["2000000092642","2000000092643"],"group_ids":["2000000092616","2000000092617"],"all_devices_group_selected":false},"app_assignment":{"app_ids":["2000000092642"]},"actions":["InteractiveLogon","RDP"],"primary_authentication":{"is_passwordless_enabled":true,"factor_configs":[{"authn_factor_config_id":200000012544,"verification_order":1}]},"secondary_authentication":{"is_mfa_enabled":true,"no_of_required_factors":1,"authn_mode":"native","factor_configs":[{"authn_factor_config_id":200000012544,"verification_order":1,"is_mandatory":true}]},"advanced_settings":{"mfa_timeout":5,"mfa_unenrolled_action":"allow","mfa_trust":{"is_enabled":true,"initiator_type":"user","duration":{"value":30,"unit":"minutes"}},"radius_response_config":{"vendor_id":"12356","attributes_list":[{"type":"vendor","number":12,"data_type":"string","value":"12"}]},"notification_template_id":200000012544}}],"advanced_settings":{"is_captcha_enabled":true,"captcha_frequency_type":"always","captcha_failed_attempts_threshold":3,"is_backup_codes_enabled":false,"emailaddress_selection_mode":"primary","mobileno_selection_mode":"select"}}';
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001"
type: PATCH
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":\"Policy 01\",\"description\":\"Test Policy\",\"is_enabled\":true,\"user_assignments\":{\"user_ids\":[\"2000000092642\",\"2000000092643\"],\"group_ids\":[\"2000000092616\"]},\"access_conditions\":{\"criteria_expression\":\"((3 and 2) and 1)\",\"conditions\":[{\"sequence_number\":1,\"factor_type\":\"ipaddress\",\"comparator\":\"in\",\"factor_configs\":[\"2000000092642\",\"2000000092643\"],\"include_all_trusted_sources\":true}]},\"access_type\":\"allow\",\"endpoints_settings\":[{\"endpoint\":\"ComputerDevices\",\"type\":\"ComputerDevices\",\"device_assignment\":{\"device_ids\":[\"2000000092642\",\"2000000092643\"],\"group_ids\":[\"2000000092616\",\"2000000092617\"],\"all_devices_group_selected\":false},\"app_assignment\":{\"app_ids\":[\"2000000092642\"]},\"actions\":[\"InteractiveLogon\",\"RDP\"],\"primary_authentication\":{\"is_passwordless_enabled\":true,\"factor_configs\":[{\"authn_factor_config_id\":200000012544,\"verification_order\":1}]},\"secondary_authentication\":{\"is_mfa_enabled\":true,\"no_of_required_factors\":1,\"authn_mode\":\"native\",\"factor_configs\":[{\"authn_factor_config_id\":200000012544,\"verification_order\":1,\"is_mandatory\":true}]},\"advanced_settings\":{\"mfa_timeout\":5,\"mfa_unenrolled_action\":\"allow\",\"mfa_trust\":{\"is_enabled\":true,\"initiator_type\":\"user\",\"duration\":{\"value\":30,\"unit\":\"minutes\"}},\"radius_response_config\":{\"vendor_id\":\"12356\",\"attributes_list\":[{\"type\":\"vendor\",\"number\":12,\"data_type\":\"string\",\"value\":\"12\"}]},\"notification_template_id\":200000012544}}],\"advanced_settings\":{\"is_captcha_enabled\":true,\"captcha_frequency_type\":\"always\",\"captcha_failed_attempts_threshold\":3,\"is_backup_codes_enabled\":false,\"emailaddress_selection_mode\":\"primary\",\"mobileno_selection_mode\":\"select\"}}");
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001")
.patch(body)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"name":"Policy 01","description":"Test Policy","is_enabled":true,"user_assignments":{"user_ids":["2000000092642","2000000092643"],"group_ids":["2000000092616"]},"access_conditions":{"criteria_expression":"((3 and 2) and 1)","conditions":[{"sequence_number":1,"factor_type":"ipaddress","comparator":"in","factor_configs":["2000000092642","2000000092643"],"include_all_trusted_sources":true}]},"access_type":"allow","endpoints_settings":[{"endpoint":"ComputerDevices","type":"ComputerDevices","device_assignment":{"device_ids":["2000000092642","2000000092643"],"group_ids":["2000000092616","2000000092617"],"all_devices_group_selected":false},"app_assignment":{"app_ids":["2000000092642"]},"actions":["InteractiveLogon","RDP"],"primary_authentication":{"is_passwordless_enabled":true,"factor_configs":[{"authn_factor_config_id":200000012544,"verification_order":1}]},"secondary_authentication":{"is_mfa_enabled":true,"no_of_required_factors":1,"authn_mode":"native","factor_configs":[{"authn_factor_config_id":200000012544,"verification_order":1,"is_mandatory":true}]},"advanced_settings":{"mfa_timeout":5,"mfa_unenrolled_action":"allow","mfa_trust":{"is_enabled":true,"initiator_type":"user","duration":{"value":30,"unit":"minutes"}},"radius_response_config":{"vendor_id":"12356","attributes_list":[{"type":"vendor","number":12,"data_type":"string","value":"12"}]},"notification_template_id":200000012544}}],"advanced_settings":{"is_captcha_enabled":true,"captcha_frequency_type":"always","captcha_failed_attempts_threshold":3,"is_backup_codes_enabled":false,"emailaddress_selection_mode":"primary","mobileno_selection_mode":"select"}}'
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
payload = "{\"name\":\"Policy 01\",\"description\":\"Test Policy\",\"is_enabled\":true,\"user_assignments\":{\"user_ids\":[\"2000000092642\",\"2000000092643\"],\"group_ids\":[\"2000000092616\"]},\"access_conditions\":{\"criteria_expression\":\"((3 and 2) and 1)\",\"conditions\":[{\"sequence_number\":1,\"factor_type\":\"ipaddress\",\"comparator\":\"in\",\"factor_configs\":[\"2000000092642\",\"2000000092643\"],\"include_all_trusted_sources\":true}]},\"access_type\":\"allow\",\"endpoints_settings\":[{\"endpoint\":\"ComputerDevices\",\"type\":\"ComputerDevices\",\"device_assignment\":{\"device_ids\":[\"2000000092642\",\"2000000092643\"],\"group_ids\":[\"2000000092616\",\"2000000092617\"],\"all_devices_group_selected\":false},\"app_assignment\":{\"app_ids\":[\"2000000092642\"]},\"actions\":[\"InteractiveLogon\",\"RDP\"],\"primary_authentication\":{\"is_passwordless_enabled\":true,\"factor_configs\":[{\"authn_factor_config_id\":200000012544,\"verification_order\":1}]},\"secondary_authentication\":{\"is_mfa_enabled\":true,\"no_of_required_factors\":1,\"authn_mode\":\"native\",\"factor_configs\":[{\"authn_factor_config_id\":200000012544,\"verification_order\":1,\"is_mandatory\":true}]},\"advanced_settings\":{\"mfa_timeout\":5,\"mfa_unenrolled_action\":\"allow\",\"mfa_trust\":{\"is_enabled\":true,\"initiator_type\":\"user\",\"duration\":{\"value\":30,\"unit\":\"minutes\"}},\"radius_response_config\":{\"vendor_id\":\"12356\",\"attributes_list\":[{\"type\":\"vendor\",\"number\":12,\"data_type\":\"string\",\"value\":\"12\"}]},\"notification_template_id\":200000012544}}],\"advanced_settings\":{\"is_captcha_enabled\":true,\"captcha_frequency_type\":\"always\",\"captcha_failed_attempts_threshold\":3,\"is_backup_codes_enabled\":false,\"emailaddress_selection_mode\":\"primary\",\"mobileno_selection_mode\":\"select\"}}"
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v1/protection/conditional-access-policies/2000000000001", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PATCH",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/2000000000001",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
name: 'Policy 01',
description: 'Test Policy',
is_enabled: true,
user_assignments: {user_ids: ['2000000092642', '2000000092643'], group_ids: ['2000000092616']},
access_conditions: {
criteria_expression: '((3 and 2) and 1)',
conditions: [
{
sequence_number: 1,
factor_type: 'ipaddress',
comparator: 'in',
factor_configs: ['2000000092642', '2000000092643'],
include_all_trusted_sources: true
}
]
},
access_type: 'allow',
endpoints_settings: [
{
endpoint: 'ComputerDevices',
type: 'ComputerDevices',
device_assignment: {
device_ids: ['2000000092642', '2000000092643'],
group_ids: ['2000000092616', '2000000092617'],
all_devices_group_selected: false
},
app_assignment: {app_ids: ['2000000092642']},
actions: ['InteractiveLogon', 'RDP'],
primary_authentication: {
is_passwordless_enabled: true,
factor_configs: [{authn_factor_config_id: 200000012544, verification_order: 1}]
},
secondary_authentication: {
is_mfa_enabled: true,
no_of_required_factors: 1,
authn_mode: 'native',
factor_configs: [
{
authn_factor_config_id: 200000012544,
verification_order: 1,
is_mandatory: true
}
]
},
advanced_settings: {
mfa_timeout: 5,
mfa_unenrolled_action: 'allow',
mfa_trust: {
is_enabled: true,
initiator_type: 'user',
duration: {value: 30, unit: 'minutes'}
},
radius_response_config: {
vendor_id: '12356',
attributes_list: [{type: 'vendor', number: 12, data_type: 'string', value: '12'}]
},
notification_template_id: 200000012544
}
}
],
advanced_settings: {
is_captcha_enabled: true,
captcha_frequency_type: 'always',
captcha_failed_attempts_threshold: 3,
is_backup_codes_enabled: false,
emailaddress_selection_mode: 'primary',
mobileno_selection_mode: 'select'
}
}));
req.end();
curl --request PATCH \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001 \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"name":"Policy 01","description":"Test Policy","is_enabled":true,"user_assignments":{"user_ids":["2000000092642","2000000092643"],"group_ids":["2000000092616"]},"access_conditions":{"criteria_expression":"((3 and 2) and 1)","conditions":[{"sequence_number":1,"factor_type":"ipaddress","comparator":"in","factor_configs":["2000000092642","2000000092643"],"include_all_trusted_sources":true}]},"access_type":"allow","endpoints_settings":[{"endpoint":"ComputerDevices","type":"ComputerDevices","device_assignment":{"device_ids":["2000000092642","2000000092643"],"group_ids":["2000000092616","2000000092617"],"all_devices_group_selected":false},"app_assignment":{"app_ids":["2000000092642"]},"actions":["InteractiveLogon","RDP"],"primary_authentication":{"is_passwordless_enabled":true,"factor_configs":[{"authn_factor_config_id":200000012544,"verification_order":1}]},"secondary_authentication":{"is_mfa_enabled":true,"no_of_required_factors":1,"authn_mode":"native","factor_configs":[{"authn_factor_config_id":200000012544,"verification_order":1,"is_mandatory":true}]},"advanced_settings":{"mfa_timeout":5,"mfa_unenrolled_action":"allow","mfa_trust":{"is_enabled":true,"initiator_type":"user","duration":{"value":30,"unit":"minutes"}},"radius_response_config":{"vendor_id":"12356","attributes_list":[{"type":"vendor","number":12,"data_type":"string","value":"12"}]},"notification_template_id":200000012544}}],"advanced_settings":{"is_captcha_enabled":true,"captcha_frequency_type":"always","captcha_failed_attempts_threshold":3,"is_backup_codes_enabled":false,"emailaddress_selection_mode":"primary","mobileno_selection_mode":"select"}}'
{
"name": "Policy 01",
"description": "Test Policy",
"is_enabled": true,
"user_assignments": {
"user_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616"
]
},
"access_conditions": {
"criteria_expression": "((3 and 2) and 1)",
"conditions": [
{
"sequence_number": 1,
"factor_type": "ipaddress",
"comparator": "in",
"factor_configs": [
"2000000092642",
"2000000092643"
],
"include_all_trusted_sources": true
}
]
},
"access_type": "allow",
"endpoints_settings": [
{
"endpoint": "ComputerDevices",
"type": "ComputerDevices",
"device_assignment": {
"device_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616",
"2000000092617"
],
"all_devices_group_selected": false
},
"app_assignment": {
"app_ids": [
"2000000092642"
]
},
"actions": [
"InteractiveLogon",
"RDP"
],
"primary_authentication": {
"is_passwordless_enabled": true,
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1
}
]
},
"secondary_authentication": {
"is_mfa_enabled": true,
"no_of_required_factors": 1,
"authn_mode": "native",
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1,
"is_mandatory": true
}
]
},
"advanced_settings": {
"mfa_timeout": 5,
"mfa_unenrolled_action": "allow",
"mfa_trust": {
"is_enabled": true,
"initiator_type": "user",
"duration": {
"value": 30,
"unit": "minutes"
}
},
"radius_response_config": {
"vendor_id": "12356",
"attributes_list": [
{
"type": "vendor",
"number": 12,
"data_type": "string",
"value": "12"
}
]
},
"notification_template_id": 200000012544
}
}
],
"advanced_settings": {
"is_captcha_enabled": true,
"captcha_frequency_type": "always",
"captcha_failed_attempts_threshold": 3,
"is_backup_codes_enabled": false,
"emailaddress_selection_mode": "primary",
"mobileno_selection_mode": "select"
}
}
{
"id": "2000000000001",
"name": "Policy 01",
"description": "Test Policy",
"is_enabled": true,
"user_assignments": {
"user_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616"
],
"users_count": 2,
"groups_count": 1
},
"access_conditions": {
"criteria_expression": "((3 and 2) and 1)",
"conditions": [
{
"sequence_number": 1,
"factor_type": "ipaddress",
"comparator": "in",
"factor_configs": [
"2000000092642",
"2000000092643"
],
"include_all_trusted_sources": true
}
]
},
"access_type": "allow",
"endpoints": [
"ComputerDevices",
"NPS",
"IIS",
"IdentityServer"
],
"endpoints_settings": [
{
"endpoint": "ComputerDevices",
"type": "ComputerDevices",
"device_assignment": {
"device_ids": [
"2000000092642",
"2000000092643"
],
"group_ids": [
"2000000092616",
"2000000092617"
],
"all_devices_group_selected": false
},
"app_assignment": {
"app_ids": [
"2000000092642"
]
},
"actions": [
"InteractiveLogon",
"RDP"
],
"primary_authentication": {
"is_passwordless_enabled": true,
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1
}
]
},
"secondary_authentication": {
"is_mfa_enabled": true,
"no_of_required_factors": 1,
"authn_mode": "native",
"factor_configs": [
{
"authn_factor_config_id": 200000012544,
"verification_order": 1,
"is_mandatory": true
}
]
}
}
]
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Delete a Conditional Access Policy
Delete a specific conditional access policy by ID.
OAuth Scope : id360.conditional_access_policy.delete,id360.conditional_access_policy.all'
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001")
.delete(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/api/v1/protection/conditional-access-policies/2000000000001", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/2000000000001",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request DELETE \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001 \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Get Conditional Access Policies Priority
Retrieve the priority order of conditional access policies.
This is an internal API
OAuth Scope : id360.conditional_access_policy.read,id360.conditional_access_policy.all
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority")
.get()
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/api/v1/protection/conditional-access-policies/priority", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/priority",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request GET \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"data": [
{
"id": "20000001002",
"name": "Policy 01",
"priority": 1
}
]
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Update Conditional Access Policies Priority
Update the priority order of conditional access policies.
This is an internal API
OAuth Scope : id360.conditional_access_policy.update,id360.conditional_access_policy.all'
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority")
.put(body)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/api/v1/protection/conditional-access-policies/priority", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/priority",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request PUT \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/priority \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
[
{
"id": "20000001002",
"priority": 1
}
]
{
"data": [
{
"id": "20000001002",
"name": "Policy 01",
"priority": 1
}
]
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Enable a Conditional Access Policy
Enables a specific conditional access policy by ID.
OAuth Scope : id360.conditional_access_policy.update,id360.conditional_access_policy.write,id360.conditional_access_policy.all'
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/enable"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/enable")
.post(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/enable', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/api/v1/protection/conditional-access-policies/2000000000001/enable", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/2000000000001/enable",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/enable \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Disable a Conditional Access Policy
Disables a specific conditional access policy by ID.
OAuth Scope : id360.conditional_access_policy.update,id360.conditional_access_policy.write,id360.conditional_access_policy.all'
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/disable"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/disable")
.post(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/disable', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/api/v1/protection/conditional-access-policies/2000000000001/disable", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/2000000000001/disable",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url https://id360.manageengine.com/api/v1/protection/conditional-access-policies/2000000000001/disable \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Bulk Enable Conditional Access Policies
Enables multiple conditional access policies by IDs.
OAuth Scope : id360.conditional_access_policy.update,id360.conditional_access_policy.write,id360.conditional_access_policy.all'
Query Parameters
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/enable?ids=2000000000001,2000000000002"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/enable?ids=2000000000001%2C2000000000002")
.post(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/enable?ids=2000000000001%2C2000000000002', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/api/v1/protection/conditional-access-policies/enable?ids=2000000000001%2C2000000000002", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/enable?ids=2000000000001%2C2000000000002",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://id360.manageengine.com/api/v1/protection/conditional-access-policies/enable?ids=2000000000001%2C2000000000002' \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
[
{
"resource_id": "2000000000001",
"status": 204
},
{
"resource_id": "2000000000002",
"status": 404,
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
]
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Bulk Disable Conditional Access Policies
Disables multiple conditional access policies by IDs.
OAuth Scope : id360.conditional_access_policy.update,id360.conditional_access_policy.write,id360.conditional_access_policy.all'
Query Parameters
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditional-access-policies/disable?ids=2000000000001,2000000000002"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditional-access-policies/disable?ids=2000000000001%2C2000000000002")
.post(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditional-access-policies/disable?ids=2000000000001%2C2000000000002', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("POST", "/api/v1/protection/conditional-access-policies/disable?ids=2000000000001%2C2000000000002", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditional-access-policies/disable?ids=2000000000001%2C2000000000002",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
curl --request POST \
--url 'https://id360.manageengine.com/api/v1/protection/conditional-access-policies/disable?ids=2000000000001%2C2000000000002' \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
[
{
"resource_id": "2000000000001",
"status": 204
},
{
"resource_id": "2000000000002",
"status": 404,
"error": {
"code": "****",
"title": "Policy Not Found",
"detail": "The specified conditional access policy does not exist."
}
}
]
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}