Update an authentication provider
Updates settings of an existing authentication provider.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const authenticationProvider = await client.authenticationProviders.update('id', {
active: true,
name: 'Okta',
settings: {
idp_entity_id: 'https://myorg.myidp.com/saml/metadata',
idp_sso_target_url: 'https://myorg.myidp.com/trust/saml2/http-post/sso',
idp_cert_fingerprint: '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7',
idp_cert_fingerprint_algorithm: 'sha1',
},
short_name: 'myorg',
});
console.log(authenticationProvider.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
authentication_provider = client.authentication_providers.update(
id="id",
active=True,
name="Okta",
settings={
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha1",
},
short_name="myorg",
)
print(authentication_provider.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
authenticationProvider, err := client.AuthenticationProviders.Update(
context.TODO(),
"id",
telnyx.AuthenticationProviderUpdateParams{
Active: telnyx.Bool(true),
Name: telnyx.String("Okta"),
Settings: telnyx.SettingsParam{
IdpEntityID: "https://myorg.myidp.com/saml/metadata",
IdpSSOTargetURL: "https://myorg.myidp.com/trust/saml2/http-post/sso",
IdpCertFingerprint: "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
IdpCertFingerprintAlgorithm: telnyx.SettingsIdpCertFingerprintAlgorithmSha1,
},
ShortName: telnyx.String("myorg"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", authenticationProvider.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.authenticationproviders.AuthenticationProviderUpdateParams;
import com.telnyx.sdk.models.authenticationproviders.AuthenticationProviderUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AuthenticationProviderUpdateResponse authenticationProvider = client.authenticationProviders().update("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
authentication_provider = telnyx.authentication_providers.update("id")
puts(authentication_provider)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$authenticationProvider = $client->authenticationProviders->update(
'id',
active: true,
name: 'Okta',
settings: [
'idpCertFingerprint' => '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7',
'idpEntityID' => 'https://myorg.myidp.com/saml/metadata',
'idpSSOTargetURL' => 'https://myorg.myidp.com/trust/saml2/http-post/sso',
'idpCertFingerprintAlgorithm' => 'sha1',
],
settingsURL: 'https://myorg.myidp.com/saml/metadata',
shortName: 'myorg',
);
var_dump($authenticationProvider);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx authentication-providers update \
--api-key 'My API Key' \
--id idcurl --request PATCH \
--url https://api.telnyx.com/v2/authentication_providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Okta",
"short_name": "myorg",
"active": true,
"settings": {
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha1"
}
}
'{
"data": {
"id": "35146afd-df93-4963-b1e9-1a085e2ae874",
"record_type": "authentication_provider",
"name": "Okta",
"short_name": "myorg",
"organization_id": "24b4a4bb-c4df-46ad-bbcb-23fc741c5ad7",
"active": true,
"activated_at": "2018-02-02T22:25:27.521Z",
"settings": {
"assertion_consumer_service_url": "https://api.telnyx.com/sso/saml/auth/myorg",
"service_provider_entity_id": "https://api.telnyx.com/sso/saml/metadata/myorg",
"service_provider_login_url": "https://api.telnyx.com/sso/myorg",
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha256",
"name_identifier_format": "urn:oasis:names:tc:SAML:1.1:nameid-format",
"idp_slo_target_url": "https://myorg.myidp.com/trust/saml2/http-redirect/slo",
"idp_certificate": "-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----",
"idp_attribute_names": {
"email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
},
"provision_groups": false
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}{}{}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifies the resource.
Body
The name associated with the authentication provider.
"Okta"
The short name associated with the authentication provider. This must be unique and URL-friendly, as it's going to be part of the login URL.
"myorg"
The active status of the authentication provider
true
The settings associated with the authentication provider.
Show child attributes
Show child attributes
The URL for the identity provider metadata file to populate the settings automatically. If the settings attribute is provided, that will be used instead.
"https://myorg.myidp.com/saml/metadata"
Response
Successful response
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const authenticationProvider = await client.authenticationProviders.update('id', {
active: true,
name: 'Okta',
settings: {
idp_entity_id: 'https://myorg.myidp.com/saml/metadata',
idp_sso_target_url: 'https://myorg.myidp.com/trust/saml2/http-post/sso',
idp_cert_fingerprint: '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7',
idp_cert_fingerprint_algorithm: 'sha1',
},
short_name: 'myorg',
});
console.log(authenticationProvider.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
authentication_provider = client.authentication_providers.update(
id="id",
active=True,
name="Okta",
settings={
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha1",
},
short_name="myorg",
)
print(authentication_provider.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
authenticationProvider, err := client.AuthenticationProviders.Update(
context.TODO(),
"id",
telnyx.AuthenticationProviderUpdateParams{
Active: telnyx.Bool(true),
Name: telnyx.String("Okta"),
Settings: telnyx.SettingsParam{
IdpEntityID: "https://myorg.myidp.com/saml/metadata",
IdpSSOTargetURL: "https://myorg.myidp.com/trust/saml2/http-post/sso",
IdpCertFingerprint: "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
IdpCertFingerprintAlgorithm: telnyx.SettingsIdpCertFingerprintAlgorithmSha1,
},
ShortName: telnyx.String("myorg"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", authenticationProvider.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.authenticationproviders.AuthenticationProviderUpdateParams;
import com.telnyx.sdk.models.authenticationproviders.AuthenticationProviderUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AuthenticationProviderUpdateResponse authenticationProvider = client.authenticationProviders().update("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
authentication_provider = telnyx.authentication_providers.update("id")
puts(authentication_provider)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$authenticationProvider = $client->authenticationProviders->update(
'id',
active: true,
name: 'Okta',
settings: [
'idpCertFingerprint' => '13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7',
'idpEntityID' => 'https://myorg.myidp.com/saml/metadata',
'idpSSOTargetURL' => 'https://myorg.myidp.com/trust/saml2/http-post/sso',
'idpCertFingerprintAlgorithm' => 'sha1',
],
settingsURL: 'https://myorg.myidp.com/saml/metadata',
shortName: 'myorg',
);
var_dump($authenticationProvider);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx authentication-providers update \
--api-key 'My API Key' \
--id idcurl --request PATCH \
--url https://api.telnyx.com/v2/authentication_providers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Okta",
"short_name": "myorg",
"active": true,
"settings": {
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha1"
}
}
'{
"data": {
"id": "35146afd-df93-4963-b1e9-1a085e2ae874",
"record_type": "authentication_provider",
"name": "Okta",
"short_name": "myorg",
"organization_id": "24b4a4bb-c4df-46ad-bbcb-23fc741c5ad7",
"active": true,
"activated_at": "2018-02-02T22:25:27.521Z",
"settings": {
"assertion_consumer_service_url": "https://api.telnyx.com/sso/saml/auth/myorg",
"service_provider_entity_id": "https://api.telnyx.com/sso/saml/metadata/myorg",
"service_provider_login_url": "https://api.telnyx.com/sso/myorg",
"idp_entity_id": "https://myorg.myidp.com/saml/metadata",
"idp_sso_target_url": "https://myorg.myidp.com/trust/saml2/http-post/sso",
"idp_cert_fingerprint": "13:38:C7:BB:C9:FF:4A:70:38:3A:E3:D9:5C:CD:DB:2E:50:1E:80:A7",
"idp_cert_fingerprint_algorithm": "sha256",
"name_identifier_format": "urn:oasis:names:tc:SAML:1.1:nameid-format",
"idp_slo_target_url": "https://myorg.myidp.com/trust/saml2/http-redirect/slo",
"idp_certificate": "-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----",
"idp_attribute_names": {
"email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
},
"provision_groups": false
},
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}{}{}{}