Reset a user's multi-factor enrollment
curl --request POST \
--url https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "User replaced their phone."
}
'import requests
url = "https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset"
payload = { "reason": "User replaced their phone." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'User replaced their phone.'})
};
fetch('https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset', 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://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'User replaced their phone.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset"
payload := strings.NewReader("{\n \"reason\": \"User replaced their phone.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"User replaced their phone.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"User replaced their phone.\"\n}"
response = http.request(request)
puts response.read_bodyMSP Administration
Reset a user's multi-factor enrollment
Removes all of a user’s MFA methods and recovery codes, for example after they lose their
phone. Returns 204. Needs a signed-in user’s token. API-key tokens from POST /v1/auth/client-token are rejected. The user needs pulse.write and an admin role.
- 400
auth_request_invalid:reasonis missing or longer than 160 characters. - 401
invalid_credentials: missing, invalid or outdated token, or an API-key token. - 403
tenant_context_denied: no admin role orpulse.write, or the user has access to a tenant outside your hierarchy. - 404
tenant_context_not_found: the user does not exist or is disabled. - 409
last_admin_required: the user is the only administrator of a tenant. - 409
mfa_state_changed: the user was changed at the same time; retry.
POST
/
v1
/
msp
/
admin
/
users
/
{userId}
/
mfa
/
reset
Reset a user's multi-factor enrollment
curl --request POST \
--url https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "User replaced their phone."
}
'import requests
url = "https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset"
payload = { "reason": "User replaced their phone." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'User replaced their phone.'})
};
fetch('https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset', 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://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'User replaced their phone.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset"
payload := strings.NewReader("{\n \"reason\": \"User replaced their phone.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"User replaced their phone.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.cyrisma.com/ta/v1/msp/admin/users/{userId}/mfa/reset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"User replaced their phone.\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
A machine-client token from POST /v1/auth/client-token. Reads need the pulse.read scope; provisioning and tenant updates need pulse.write, which the token only carries when requested_scopes asks for it. Creating, changing, disabling and resetting MFA for users, and the tenant sign-in policy, need a signed-in user's token instead: they reject API-key tokens.
Path Parameters
Body
application/json
Response
204
No Content
