Upsert SSO provider configuration
curl --request PUT \
--url https://identity.sandbox.lerian.net/v1/sso/provider \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": true,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/sso/provider"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"type\": \"Google\",\n \"customAuthUrl\": \"<string>\",\n \"customTokenUrl\": \"<string>\",\n \"customUserInfoUrl\": \"<string>\",\n \"disablePasswordLogin\": true,\n \"domain\": \"https://your-org.okta.com\",\n \"issuerUrl\": \"<string>\",\n \"name\": \"<string>\",\n \"scopes\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '<string>',
clientSecret: '<string>',
type: 'Google',
customAuthUrl: '<string>',
customTokenUrl: '<string>',
customUserInfoUrl: '<string>',
disablePasswordLogin: true,
domain: 'https://your-org.okta.com',
issuerUrl: '<string>',
name: '<string>',
scopes: '<string>'
})
};
fetch('https://identity.sandbox.lerian.net/v1/sso/provider', 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/provider"
payload = {
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": True,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"configured": true,
"passwordEnabled": true,
"provider": {
"appId": "<string>",
"category": "Email",
"clientId": "<string>",
"clientId2": "<string>",
"content": "<string>",
"createdAt": "2021-09-01T00:00:00Z",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disableSsl": true,
"domain": "<string>",
"endpoint": "<string>",
"host": "<string>",
"id": "00000000-0000-0000-0000-000000000000",
"intranetEndpoint": "<string>",
"issuerUrl": "<string>",
"method": "<string>",
"name": "SMTP Corp",
"port": 123,
"providerUrl": "<string>",
"receiver": "<string>",
"regionId": "<string>",
"scopes": "<string>",
"signName": "<string>",
"subType": "<string>",
"templateCode": "<string>",
"title": "<string>",
"type": "SendGrid"
}
}{
"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>"
}Upsert SSO provider configuration
Creates or REPLACES your organization’s SSO provider configuration.
⚠️ A configuration that is accepted here but wrong at the identity provider locks people out at the login screen. Validate the configuration first with POST /v1/sso/provider/preflight, which writes nothing.
Failures:
400— the configuration is malformed.503 IDE-0066— the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.
PUT
/
v1
/
sso
/
provider
Upsert SSO provider configuration
curl --request PUT \
--url https://identity.sandbox.lerian.net/v1/sso/provider \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": true,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity.sandbox.lerian.net/v1/sso/provider"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"type\": \"Google\",\n \"customAuthUrl\": \"<string>\",\n \"customTokenUrl\": \"<string>\",\n \"customUserInfoUrl\": \"<string>\",\n \"disablePasswordLogin\": true,\n \"domain\": \"https://your-org.okta.com\",\n \"issuerUrl\": \"<string>\",\n \"name\": \"<string>\",\n \"scopes\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clientId: '<string>',
clientSecret: '<string>',
type: 'Google',
customAuthUrl: '<string>',
customTokenUrl: '<string>',
customUserInfoUrl: '<string>',
disablePasswordLogin: true,
domain: 'https://your-org.okta.com',
issuerUrl: '<string>',
name: '<string>',
scopes: '<string>'
})
};
fetch('https://identity.sandbox.lerian.net/v1/sso/provider', 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/provider"
payload = {
"clientId": "<string>",
"clientSecret": "<string>",
"type": "Google",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disablePasswordLogin": True,
"domain": "https://your-org.okta.com",
"issuerUrl": "<string>",
"name": "<string>",
"scopes": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"configured": true,
"passwordEnabled": true,
"provider": {
"appId": "<string>",
"category": "Email",
"clientId": "<string>",
"clientId2": "<string>",
"content": "<string>",
"createdAt": "2021-09-01T00:00:00Z",
"customAuthUrl": "<string>",
"customTokenUrl": "<string>",
"customUserInfoUrl": "<string>",
"disableSsl": true,
"domain": "<string>",
"endpoint": "<string>",
"host": "<string>",
"id": "00000000-0000-0000-0000-000000000000",
"intranetEndpoint": "<string>",
"issuerUrl": "<string>",
"method": "<string>",
"name": "SMTP Corp",
"port": 123,
"providerUrl": "<string>",
"receiver": "<string>",
"regionId": "<string>",
"scopes": "<string>",
"signName": "<string>",
"subType": "<string>",
"templateCode": "<string>",
"title": "<string>",
"type": "SendGrid"
}
}{
"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>"
}Authorizations
JWT bearer token issued by the identity provider.
Body
application/json
The SSO provider configuration to store.
Was this page helpful?

