Account Linking
This API allows you to manage the settings for linking local accounts on devices with Identity360 accounts.
Attribute
- attribute
- naming_format
- standard
- admin
{
"is_enabled": false,
"attribute_type": "attribute",
"attribute_value": "localAccountName",
"link_restricted_local_accounts": [
"sysadmin",
"administrator",
"recovery"
],
"ondemand_provisioning_settings": {
"is_enabled": false,
"default_permission_level": "standard"
}
}
Get Device Account Linking Settings
The Get Device Account Linking Settings API can be used to get the settings for linking local accounts on devices with Identity360 accounts.
OAuth Scope : id360.device.READ,id360.device.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/device-account-linking"
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/device-account-linking")
.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/device-account-linking', 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/device-account-linking", 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/device-account-linking",
"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/device-account-linking \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"is_enabled": false,
"attribute_type": "attribute",
"attribute_value": "localAccountName",
"link_restricted_local_accounts": [
"sysadmin",
"administrator",
"recovery"
],
"ondemand_provisioning_settings": {
"is_enabled": false,
"default_permission_level": "standard"
}
}
{
"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."
}
}
Update Device Account Linking Settings
The Update Device Account Linking Settings API can be used to update the settings for linking local accounts on devices with Identity360 accounts.
OAuth Scope : id360.device.WRITE,id360.device.ALL
Arguments
- attribute
- naming_format
- standard
- admin
parameters_data='{"is_enabled":false,"attribute_type":"attribute","attribute_value":"localAccountName","link_restricted_local_accounts":["sysadmin","administrator","recovery"],"ondemand_provisioning_settings":{"is_enabled":false,"default_permission_level":"standard"}}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/device-account-linking"
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, "{\"is_enabled\":false,\"attribute_type\":\"attribute\",\"attribute_value\":\"localAccountName\",\"link_restricted_local_accounts\":[\"sysadmin\",\"administrator\",\"recovery\"],\"ondemand_provisioning_settings\":{\"is_enabled\":false,\"default_permission_level\":\"standard\"}}");
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/device-account-linking")
.patch(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"is_enabled":false,"attribute_type":"attribute","attribute_value":"localAccountName","link_restricted_local_accounts":["sysadmin","administrator","recovery"],"ondemand_provisioning_settings":{"is_enabled":false,"default_permission_level":"standard"}}'
};
fetch('https://id360.manageengine.com/api/v1/device-account-linking', 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 = "{\"is_enabled\":false,\"attribute_type\":\"attribute\",\"attribute_value\":\"localAccountName\",\"link_restricted_local_accounts\":[\"sysadmin\",\"administrator\",\"recovery\"],\"ondemand_provisioning_settings\":{\"is_enabled\":false,\"default_permission_level\":\"standard\"}}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v1/device-account-linking", 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/device-account-linking",
"headers": {
"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({
is_enabled: false,
attribute_type: 'attribute',
attribute_value: 'localAccountName',
link_restricted_local_accounts: ['sysadmin', 'administrator', 'recovery'],
ondemand_provisioning_settings: {is_enabled: false, default_permission_level: 'standard'}
}));
req.end();
curl --request PATCH \
--url https://id360.manageengine.com/api/v1/device-account-linking \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"is_enabled":false,"attribute_type":"attribute","attribute_value":"localAccountName","link_restricted_local_accounts":["sysadmin","administrator","recovery"],"ondemand_provisioning_settings":{"is_enabled":false,"default_permission_level":"standard"}}'
{
"is_enabled": false,
"attribute_type": "attribute",
"attribute_value": "localAccountName",
"link_restricted_local_accounts": [
"sysadmin",
"administrator",
"recovery"
],
"ondemand_provisioning_settings": {
"is_enabled": false,
"default_permission_level": "standard"
}
}
{
"is_enabled": false,
"attribute_type": "attribute",
"attribute_value": "localAccountName",
"link_restricted_local_accounts": [
"sysadmin",
"administrator",
"recovery"
],
"ondemand_provisioning_settings": {
"is_enabled": false,
"default_permission_level": "standard"
}
}
{
"error": {
"code": 71,
"title": "Invalid Parameter",
"detail": "Value for mandatory field 'email' is not provided"
}
}
{
"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."
}
}
Sync Device Account Linking
The Sync Device Account Linking API can be used to apply the current account linking settings to all unlinked local accounts on devices.
OAuth Scope : id360.device.WRITE,id360.device.ALL
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/device-account-linking/sync-now"
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/device-account-linking/sync-now")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/device-account-linking/sync-now', 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 = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/api/v1/device-account-linking/sync-now", 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/device-account-linking/sync-now",
"headers": {
"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/device-account-linking/sync-now \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"data": {
"id": "2000000293042",
"status": "RUNNING",
"message": "Process is initiated, check jobs for current status."
}
}
{
"error": {
"code": 71,
"title": "Invalid Parameter",
"detail": "Value for mandatory field 'email' is not provided"
}
}
{
"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 Device Account Linking History
The Get Device Account Linking History API can be used to get the history of account linking operations performed on devices.
OAuth Scope : id360.device.READ,id360.device.ALL
Query Parameters
eg: firstName eq "John" and lastName eq "Doe"
eg: firstName,-lastName
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/device-account-linking/history"
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/device-account-linking/history")
.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/device-account-linking/history', 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/device-account-linking/history", 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/device-account-linking/history",
"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/device-account-linking/history \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"data": [
{
"id": "2000000000001",
"device_name": "Walter-qa-1",
"link_action": "Link",
"local_account": {
"id": "2000000000001",
"user_name": "John"
},
"idp_account": {
"user_id": "2000000000002",
"user_name": "johndoe@company.com"
},
"action_time": "2021-06-25T06:38:00Z",
"linking_attribute": "Custom Naming Format1",
"status": "success"
},
{
"id": "2000000000002",
"device_name": "Walter-qa-1",
"link_action": "Unlink",
"local_account": {
"id": "2000000000003",
"name": "Jane"
},
"idp_account": {
"user_id": "2000000000004",
"user_name": "janesmith@company.com"
},
"action_time": "2021-06-25T06:38:00Z",
"linking_attribute": "Custom Naming Format2",
"status": "failed",
"status_message": "Local account does not exist in target device"
}
],
"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."
}
}