Replace an SSO connection's configuration with SAML
curl --request POST \
--url https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml', 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://api.openworklabs.com/v1/sso/connections/{connectionId}/saml",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.openworklabs.com/v1/sso/connections/{connectionId}/saml"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"connection": {
"id": "<string>",
"providerId": "<string>",
"name": "<string>",
"displayName": "<string>",
"kind": "oidc",
"issuer": "<string>",
"domain": "<string>",
"domains": [
"<string>"
],
"status": "disabled",
"testStatus": "untested",
"testExpiresAt": "2023-11-07T05:31:56Z",
"signInPath": "<string>",
"signInUrl": "<string>",
"redirectUrl": "<string>",
"acsUrl": "<string>",
"metadataUrl": "<string>",
"domainVerified": true,
"domainVerificationHost": "<string>",
"domainVerificationDnsName": "<string>",
"domainVerificationDnsNames": [
{
"domain": "<string>",
"dnsName": "<string>"
}
],
"oidc": {
"clientId": "<string>",
"scopes": [
"<string>"
],
"skipDiscovery": true,
"authorizationEndpoint": "<string>",
"tokenEndpoint": "<string>",
"jwksEndpoint": "<string>",
"userInfoEndpoint": "<string>",
"tokenEndpointAuthentication": "client_secret_basic"
},
"saml": {
"entryPoint": "<string>",
"audience": "<string>",
"wantAssertionsSigned": true
},
"lastTestedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"domainVerificationToken": "<string>"
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "unauthorized"
}{
"error": "enterprise_plan_required",
"feature": "<string>",
"message": "<string>"
}{
"error": "forbidden",
"message": "<string>",
"reason": "<string>"
}{
"error": "organization_not_found",
"feature": "<string>"
}SSO
Replace an SSO connection's configuration with SAML
Replaces one connection’s identity provider configuration and domains. It is disabled until its domains are verified and the new configuration is tested and enabled again. Requires multipleSsoConnections.
POST
/
v1
/
sso
/
connections
/
{connectionId}
/
saml
Replace an SSO connection's configuration with SAML
curl --request POST \
--url https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml', 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://api.openworklabs.com/v1/sso/connections/{connectionId}/saml",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api.openworklabs.com/v1/sso/connections/{connectionId}/saml"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/sso/connections/{connectionId}/saml")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"connection": {
"id": "<string>",
"providerId": "<string>",
"name": "<string>",
"displayName": "<string>",
"kind": "oidc",
"issuer": "<string>",
"domain": "<string>",
"domains": [
"<string>"
],
"status": "disabled",
"testStatus": "untested",
"testExpiresAt": "2023-11-07T05:31:56Z",
"signInPath": "<string>",
"signInUrl": "<string>",
"redirectUrl": "<string>",
"acsUrl": "<string>",
"metadataUrl": "<string>",
"domainVerified": true,
"domainVerificationHost": "<string>",
"domainVerificationDnsName": "<string>",
"domainVerificationDnsNames": [
{
"domain": "<string>",
"dnsName": "<string>"
}
],
"oidc": {
"clientId": "<string>",
"scopes": [
"<string>"
],
"skipDiscovery": true,
"authorizationEndpoint": "<string>",
"tokenEndpoint": "<string>",
"jwksEndpoint": "<string>",
"userInfoEndpoint": "<string>",
"tokenEndpointAuthentication": "client_secret_basic"
},
"saml": {
"entryPoint": "<string>",
"audience": "<string>",
"wantAssertionsSigned": true
},
"lastTestedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"domainVerificationToken": "<string>"
}{
"error": "invalid_request",
"details": [
{
"message": "<string>",
"path": [
"<string>"
]
}
]
}{
"error": "unauthorized"
}{
"error": "enterprise_plan_required",
"feature": "<string>",
"message": "<string>"
}{
"error": "forbidden",
"message": "<string>",
"reason": "<string>"
}{
"error": "organization_not_found",
"feature": "<string>"
}Authorizations
Den session token passed as Authorization: Bearer <session-token> for user-authenticated Den routes. Not for API keys: send den_ keys in the x-api-key header instead.
Path Parameters
Was this page helpful?