Disallow password reset for a User
curl --request PUT \
--url https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords"
headers = {"Admin-Auth": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Admin-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Message": "User updated",
"Meta": {
"PWHistory": [],
"access_key": "68b225c4376748207453c235ed8e2a82",
"active": true,
"created_at": "2021-09-15T15:49:01Z",
"email_address": "john@test.com",
"first_name": "John",
"group_id": "",
"id": "614215edb2d47190f98b3b79",
"last_login_date": "2021-09-15T15:49:49.754Z",
"last_name": "Doe",
"org_id": "60ef3a1dcb83670001bf2df9",
"password_max_days": 0,
"password_updated": "2021-09-15T15:49:01.863Z",
"user_permissions": {
"IsAdmin": "admin",
"ResetPassword": "admin"
}
},
"Status": "OK"
}{
"Message": "Failed to update User object to DB",
"Meta": null,
"Status": "Error"
}{
"Message": "Could not retrieve user detail",
"Meta": null,
"Status": "Error"
}Users
Disallow password reset for a User
Disallow password reset for a User.
PUT
/
admin
/
users
/
{userId}
/
actions
/
disallow_reset_passwords
Disallow password reset for a User
curl --request PUT \
--url https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords \
--header 'Admin-Auth: <api-key>'import requests
url = "https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords"
headers = {"Admin-Auth": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'Admin-Auth': '<api-key>'}};
fetch('https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Admin-Auth: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Admin-Auth", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords")
.header("Admin-Auth", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}/admin/users/{userId}/actions/disallow_reset_passwords")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Admin-Auth"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Message": "User updated",
"Meta": {
"PWHistory": [],
"access_key": "68b225c4376748207453c235ed8e2a82",
"active": true,
"created_at": "2021-09-15T15:49:01Z",
"email_address": "john@test.com",
"first_name": "John",
"group_id": "",
"id": "614215edb2d47190f98b3b79",
"last_login_date": "2021-09-15T15:49:49.754Z",
"last_name": "Doe",
"org_id": "60ef3a1dcb83670001bf2df9",
"password_max_days": 0,
"password_updated": "2021-09-15T15:49:01.863Z",
"user_permissions": {
"IsAdmin": "admin",
"ResetPassword": "admin"
}
},
"Status": "OK"
}{
"Message": "Failed to update User object to DB",
"Meta": null,
"Status": "Error"
}{
"Message": "Could not retrieve user detail",
"Meta": null,
"Status": "Error"
}Was this page helpful?
⌘I