Update SSO login policy
curl --request PATCH \
--url https://identity.sandbox.lerian.net/v1/sso/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowLocalPassword": true
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/sso/policy"
payload := strings.NewReader("{\n \"allowLocalPassword\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowLocalPassword: true})
};
fetch('https://identity.sandbox.lerian.net/v1/sso/policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/sso/policy"
payload = { "allowLocalPassword": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"allowLocalPassword": true
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Update SSO login policy
Failures:
400— the policy payload is malformed.404— the application backing your organization’s login was not found.503 IDE-0066— the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.
PATCH
/
v1
/
sso
/
policy
Update SSO login policy
curl --request PATCH \
--url https://identity.sandbox.lerian.net/v1/sso/policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowLocalPassword": true
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/sso/policy"
payload := strings.NewReader("{\n \"allowLocalPassword\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowLocalPassword: true})
};
fetch('https://identity.sandbox.lerian.net/v1/sso/policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://identity.sandbox.lerian.net/v1/sso/policy"
payload = { "allowLocalPassword": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"allowLocalPassword": true
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}{
"code": "<string>",
"entityType": "<string>",
"err": "<unknown>",
"message": "<string>",
"title": "<string>"
}Was this page helpful?

