Create a new SSO profile
curl --request POST \
--url http://localhost:3001/portal-api/sso_profiles \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"ID": "ldap_dev",
"Name": "Developers@LocalAD",
"OrgID": "1",
"ActionType": "GenerateOrLoginDeveloperProfile",
"MatchedPolicyID": "<string>",
"Type": "redirect",
"ProviderName": "ADProvider",
"CustomEmailField": "<string>",
"CustomUserIDField": "<string>",
"ProviderConfig": {},
"IdentityHandlerConfig": {},
"ProviderConstraintsDomain": "<string>",
"ProviderConstraintsGroup": "<string>",
"ReturnURL": "http://localhost:3001/sso",
"DefaultUserGroupID": "<string>",
"CustomUserGroupField": "cn",
"UserGroupMapping": {
"TeamA": "9",
"TeamB": "11"
},
"UserGroupSeparator": "<string>",
"SSOOnlyForRegisteredUsers": false
}
'import requests
url = "http://localhost:3001/portal-api/sso_profiles"
payload = {
"ID": "ldap_dev",
"Name": "Developers@LocalAD",
"OrgID": "1",
"ActionType": "GenerateOrLoginDeveloperProfile",
"MatchedPolicyID": "<string>",
"Type": "redirect",
"ProviderName": "ADProvider",
"CustomEmailField": "<string>",
"CustomUserIDField": "<string>",
"ProviderConfig": {},
"IdentityHandlerConfig": {},
"ProviderConstraintsDomain": "<string>",
"ProviderConstraintsGroup": "<string>",
"ReturnURL": "http://localhost:3001/sso",
"DefaultUserGroupID": "<string>",
"CustomUserGroupField": "cn",
"UserGroupMapping": {
"TeamA": "9",
"TeamB": "11"
},
"UserGroupSeparator": "<string>",
"SSOOnlyForRegisteredUsers": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ID: 'ldap_dev',
Name: 'Developers@LocalAD',
OrgID: '1',
ActionType: 'GenerateOrLoginDeveloperProfile',
MatchedPolicyID: '<string>',
Type: 'redirect',
ProviderName: 'ADProvider',
CustomEmailField: '<string>',
CustomUserIDField: '<string>',
ProviderConfig: {},
IdentityHandlerConfig: {},
ProviderConstraintsDomain: '<string>',
ProviderConstraintsGroup: '<string>',
ReturnURL: 'http://localhost:3001/sso',
DefaultUserGroupID: '<string>',
CustomUserGroupField: 'cn',
UserGroupMapping: {TeamA: '9', TeamB: '11'},
UserGroupSeparator: '<string>',
SSOOnlyForRegisteredUsers: false
})
};
fetch('http://localhost:3001/portal-api/sso_profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/sso_profiles",
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([
'ID' => 'ldap_dev',
'Name' => 'Developers@LocalAD',
'OrgID' => '1',
'ActionType' => 'GenerateOrLoginDeveloperProfile',
'MatchedPolicyID' => '<string>',
'Type' => 'redirect',
'ProviderName' => 'ADProvider',
'CustomEmailField' => '<string>',
'CustomUserIDField' => '<string>',
'ProviderConfig' => [
],
'IdentityHandlerConfig' => [
],
'ProviderConstraintsDomain' => '<string>',
'ProviderConstraintsGroup' => '<string>',
'ReturnURL' => 'http://localhost:3001/sso',
'DefaultUserGroupID' => '<string>',
'CustomUserGroupField' => 'cn',
'UserGroupMapping' => [
'TeamA' => '9',
'TeamB' => '11'
],
'UserGroupSeparator' => '<string>',
'SSOOnlyForRegisteredUsers' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "http://localhost:3001/portal-api/sso_profiles"
payload := strings.NewReader("{\n \"ID\": \"ldap_dev\",\n \"Name\": \"Developers@LocalAD\",\n \"OrgID\": \"1\",\n \"ActionType\": \"GenerateOrLoginDeveloperProfile\",\n \"MatchedPolicyID\": \"<string>\",\n \"Type\": \"redirect\",\n \"ProviderName\": \"ADProvider\",\n \"CustomEmailField\": \"<string>\",\n \"CustomUserIDField\": \"<string>\",\n \"ProviderConfig\": {},\n \"IdentityHandlerConfig\": {},\n \"ProviderConstraintsDomain\": \"<string>\",\n \"ProviderConstraintsGroup\": \"<string>\",\n \"ReturnURL\": \"http://localhost:3001/sso\",\n \"DefaultUserGroupID\": \"<string>\",\n \"CustomUserGroupField\": \"cn\",\n \"UserGroupMapping\": {\n \"TeamA\": \"9\",\n \"TeamB\": \"11\"\n },\n \"UserGroupSeparator\": \"<string>\",\n \"SSOOnlyForRegisteredUsers\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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("http://localhost:3001/portal-api/sso_profiles")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ID\": \"ldap_dev\",\n \"Name\": \"Developers@LocalAD\",\n \"OrgID\": \"1\",\n \"ActionType\": \"GenerateOrLoginDeveloperProfile\",\n \"MatchedPolicyID\": \"<string>\",\n \"Type\": \"redirect\",\n \"ProviderName\": \"ADProvider\",\n \"CustomEmailField\": \"<string>\",\n \"CustomUserIDField\": \"<string>\",\n \"ProviderConfig\": {},\n \"IdentityHandlerConfig\": {},\n \"ProviderConstraintsDomain\": \"<string>\",\n \"ProviderConstraintsGroup\": \"<string>\",\n \"ReturnURL\": \"http://localhost:3001/sso\",\n \"DefaultUserGroupID\": \"<string>\",\n \"CustomUserGroupField\": \"cn\",\n \"UserGroupMapping\": {\n \"TeamA\": \"9\",\n \"TeamB\": \"11\"\n },\n \"UserGroupSeparator\": \"<string>\",\n \"SSOOnlyForRegisteredUsers\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/portal-api/sso_profiles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ID\": \"ldap_dev\",\n \"Name\": \"Developers@LocalAD\",\n \"OrgID\": \"1\",\n \"ActionType\": \"GenerateOrLoginDeveloperProfile\",\n \"MatchedPolicyID\": \"<string>\",\n \"Type\": \"redirect\",\n \"ProviderName\": \"ADProvider\",\n \"CustomEmailField\": \"<string>\",\n \"CustomUserIDField\": \"<string>\",\n \"ProviderConfig\": {},\n \"IdentityHandlerConfig\": {},\n \"ProviderConstraintsDomain\": \"<string>\",\n \"ProviderConstraintsGroup\": \"<string>\",\n \"ReturnURL\": \"http://localhost:3001/sso\",\n \"DefaultUserGroupID\": \"<string>\",\n \"CustomUserGroupField\": \"cn\",\n \"UserGroupMapping\": {\n \"TeamA\": \"9\",\n \"TeamB\": \"11\"\n },\n \"UserGroupSeparator\": \"<string>\",\n \"SSOOnlyForRegisteredUsers\": false\n}"
response = http.request(request)
puts response.read_body{
"errors": [
"<string>"
]
}SSO Profiles
Create a new SSO profile
Create a new SSO profile
POST
/
sso_profiles
Create a new SSO profile
curl --request POST \
--url http://localhost:3001/portal-api/sso_profiles \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"ID": "ldap_dev",
"Name": "Developers@LocalAD",
"OrgID": "1",
"ActionType": "GenerateOrLoginDeveloperProfile",
"MatchedPolicyID": "<string>",
"Type": "redirect",
"ProviderName": "ADProvider",
"CustomEmailField": "<string>",
"CustomUserIDField": "<string>",
"ProviderConfig": {},
"IdentityHandlerConfig": {},
"ProviderConstraintsDomain": "<string>",
"ProviderConstraintsGroup": "<string>",
"ReturnURL": "http://localhost:3001/sso",
"DefaultUserGroupID": "<string>",
"CustomUserGroupField": "cn",
"UserGroupMapping": {
"TeamA": "9",
"TeamB": "11"
},
"UserGroupSeparator": "<string>",
"SSOOnlyForRegisteredUsers": false
}
'import requests
url = "http://localhost:3001/portal-api/sso_profiles"
payload = {
"ID": "ldap_dev",
"Name": "Developers@LocalAD",
"OrgID": "1",
"ActionType": "GenerateOrLoginDeveloperProfile",
"MatchedPolicyID": "<string>",
"Type": "redirect",
"ProviderName": "ADProvider",
"CustomEmailField": "<string>",
"CustomUserIDField": "<string>",
"ProviderConfig": {},
"IdentityHandlerConfig": {},
"ProviderConstraintsDomain": "<string>",
"ProviderConstraintsGroup": "<string>",
"ReturnURL": "http://localhost:3001/sso",
"DefaultUserGroupID": "<string>",
"CustomUserGroupField": "cn",
"UserGroupMapping": {
"TeamA": "9",
"TeamB": "11"
},
"UserGroupSeparator": "<string>",
"SSOOnlyForRegisteredUsers": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ID: 'ldap_dev',
Name: 'Developers@LocalAD',
OrgID: '1',
ActionType: 'GenerateOrLoginDeveloperProfile',
MatchedPolicyID: '<string>',
Type: 'redirect',
ProviderName: 'ADProvider',
CustomEmailField: '<string>',
CustomUserIDField: '<string>',
ProviderConfig: {},
IdentityHandlerConfig: {},
ProviderConstraintsDomain: '<string>',
ProviderConstraintsGroup: '<string>',
ReturnURL: 'http://localhost:3001/sso',
DefaultUserGroupID: '<string>',
CustomUserGroupField: 'cn',
UserGroupMapping: {TeamA: '9', TeamB: '11'},
UserGroupSeparator: '<string>',
SSOOnlyForRegisteredUsers: false
})
};
fetch('http://localhost:3001/portal-api/sso_profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/portal-api/sso_profiles",
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([
'ID' => 'ldap_dev',
'Name' => 'Developers@LocalAD',
'OrgID' => '1',
'ActionType' => 'GenerateOrLoginDeveloperProfile',
'MatchedPolicyID' => '<string>',
'Type' => 'redirect',
'ProviderName' => 'ADProvider',
'CustomEmailField' => '<string>',
'CustomUserIDField' => '<string>',
'ProviderConfig' => [
],
'IdentityHandlerConfig' => [
],
'ProviderConstraintsDomain' => '<string>',
'ProviderConstraintsGroup' => '<string>',
'ReturnURL' => 'http://localhost:3001/sso',
'DefaultUserGroupID' => '<string>',
'CustomUserGroupField' => 'cn',
'UserGroupMapping' => [
'TeamA' => '9',
'TeamB' => '11'
],
'UserGroupSeparator' => '<string>',
'SSOOnlyForRegisteredUsers' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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 := "http://localhost:3001/portal-api/sso_profiles"
payload := strings.NewReader("{\n \"ID\": \"ldap_dev\",\n \"Name\": \"Developers@LocalAD\",\n \"OrgID\": \"1\",\n \"ActionType\": \"GenerateOrLoginDeveloperProfile\",\n \"MatchedPolicyID\": \"<string>\",\n \"Type\": \"redirect\",\n \"ProviderName\": \"ADProvider\",\n \"CustomEmailField\": \"<string>\",\n \"CustomUserIDField\": \"<string>\",\n \"ProviderConfig\": {},\n \"IdentityHandlerConfig\": {},\n \"ProviderConstraintsDomain\": \"<string>\",\n \"ProviderConstraintsGroup\": \"<string>\",\n \"ReturnURL\": \"http://localhost:3001/sso\",\n \"DefaultUserGroupID\": \"<string>\",\n \"CustomUserGroupField\": \"cn\",\n \"UserGroupMapping\": {\n \"TeamA\": \"9\",\n \"TeamB\": \"11\"\n },\n \"UserGroupSeparator\": \"<string>\",\n \"SSOOnlyForRegisteredUsers\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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("http://localhost:3001/portal-api/sso_profiles")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ID\": \"ldap_dev\",\n \"Name\": \"Developers@LocalAD\",\n \"OrgID\": \"1\",\n \"ActionType\": \"GenerateOrLoginDeveloperProfile\",\n \"MatchedPolicyID\": \"<string>\",\n \"Type\": \"redirect\",\n \"ProviderName\": \"ADProvider\",\n \"CustomEmailField\": \"<string>\",\n \"CustomUserIDField\": \"<string>\",\n \"ProviderConfig\": {},\n \"IdentityHandlerConfig\": {},\n \"ProviderConstraintsDomain\": \"<string>\",\n \"ProviderConstraintsGroup\": \"<string>\",\n \"ReturnURL\": \"http://localhost:3001/sso\",\n \"DefaultUserGroupID\": \"<string>\",\n \"CustomUserGroupField\": \"cn\",\n \"UserGroupMapping\": {\n \"TeamA\": \"9\",\n \"TeamB\": \"11\"\n },\n \"UserGroupSeparator\": \"<string>\",\n \"SSOOnlyForRegisteredUsers\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/portal-api/sso_profiles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ID\": \"ldap_dev\",\n \"Name\": \"Developers@LocalAD\",\n \"OrgID\": \"1\",\n \"ActionType\": \"GenerateOrLoginDeveloperProfile\",\n \"MatchedPolicyID\": \"<string>\",\n \"Type\": \"redirect\",\n \"ProviderName\": \"ADProvider\",\n \"CustomEmailField\": \"<string>\",\n \"CustomUserIDField\": \"<string>\",\n \"ProviderConfig\": {},\n \"IdentityHandlerConfig\": {},\n \"ProviderConstraintsDomain\": \"<string>\",\n \"ProviderConstraintsGroup\": \"<string>\",\n \"ReturnURL\": \"http://localhost:3001/sso\",\n \"DefaultUserGroupID\": \"<string>\",\n \"CustomUserGroupField\": \"cn\",\n \"UserGroupMapping\": {\n \"TeamA\": \"9\",\n \"TeamB\": \"11\"\n },\n \"UserGroupSeparator\": \"<string>\",\n \"SSOOnlyForRegisteredUsers\": false\n}"
response = http.request(request)
puts response.read_body{
"errors": [
"<string>"
]
}Authorizations
Body
application/json
Unique identifier/key for the SSO profile
Example:
"ldap_dev"
Name of the SSO profile
Example:
"Developers@LocalAD"
Organization ID
Example:
"1"
Type of action to perform
Example:
"GenerateOrLoginDeveloperProfile"
ID of the matched policy
Type of SSO profile
Example:
"redirect"
Name of the provider
Example:
"ADProvider"
Custom field for email mapping
Custom field for user ID mapping
JSON configuration for the provider
JSON configuration for identity handling
Domain constraints for the provider
Group constraints for the provider
URL to return to after SSO
Example:
"http://localhost:3001/sso"
Default group ID for new users
Custom field for user group mapping
Example:
"cn"
JSON mapping of user groups
Example:
{ "TeamA": "9", "TeamB": "11" }
Separator used in user group strings
Whether SSO is restricted to registered users only
Response
Created
Was this page helpful?
⌘I