IDプロバイダーを作成する
curl --request POST \
--url https://{tenantDomain}/my-org/v1/identity-providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assign_membership_on_login": false,
"display_name": "OIDC IdP",
"domains": [
"mydomain.com"
],
"is_enabled": true,
"name": "oidcIdp",
"options": {
"client_id": "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
"client_secret": "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration",
"type": "front_channel"
},
"show_as_button": true,
"strategy": "oidc"
}
'import requests
url = "https://{tenantDomain}/my-org/v1/identity-providers"
payload = {
"assign_membership_on_login": False,
"display_name": "OIDC IdP",
"domains": ["mydomain.com"],
"is_enabled": True,
"name": "oidcIdp",
"options": {
"client_id": "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
"client_secret": "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration",
"type": "front_channel"
},
"show_as_button": True,
"strategy": "oidc"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assign_membership_on_login: false,
display_name: 'OIDC IdP',
domains: ['mydomain.com'],
is_enabled: true,
name: 'oidcIdp',
options: {
client_id: 'a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d',
client_secret: 'KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp',
discovery_url: 'https://{yourDomain}/.well-known/openid-configuration',
type: 'front_channel'
},
show_as_button: true,
strategy: 'oidc'
})
};
fetch('https://{tenantDomain}/my-org/v1/identity-providers', 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://{tenantDomain}/my-org/v1/identity-providers",
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([
'assign_membership_on_login' => false,
'display_name' => 'OIDC IdP',
'domains' => [
'mydomain.com'
],
'is_enabled' => true,
'name' => 'oidcIdp',
'options' => [
'client_id' => 'a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d',
'client_secret' => 'KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp',
'discovery_url' => 'https://{yourDomain}/.well-known/openid-configuration',
'type' => 'front_channel'
],
'show_as_button' => true,
'strategy' => 'oidc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://{tenantDomain}/my-org/v1/identity-providers"
payload := strings.NewReader("{\n \"assign_membership_on_login\": false,\n \"display_name\": \"OIDC IdP\",\n \"domains\": [\n \"mydomain.com\"\n ],\n \"is_enabled\": true,\n \"name\": \"oidcIdp\",\n \"options\": {\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\",\n \"type\": \"front_channel\"\n },\n \"show_as_button\": true,\n \"strategy\": \"oidc\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/my-org/v1/identity-providers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assign_membership_on_login\": false,\n \"display_name\": \"OIDC IdP\",\n \"domains\": [\n \"mydomain.com\"\n ],\n \"is_enabled\": true,\n \"name\": \"oidcIdp\",\n \"options\": {\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\",\n \"type\": \"front_channel\"\n },\n \"show_as_button\": true,\n \"strategy\": \"oidc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/identity-providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assign_membership_on_login\": false,\n \"display_name\": \"OIDC IdP\",\n \"domains\": [\n \"mydomain.com\"\n ],\n \"is_enabled\": true,\n \"name\": \"oidcIdp\",\n \"options\": {\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\",\n \"type\": \"front_channel\"\n },\n \"show_as_button\": true,\n \"strategy\": \"oidc\"\n}"
response = http.request(request)
puts response.read_body{
"access_level": "full",
"assign_membership_on_login": false,
"attributes": [
{
"description": "希望するユーザー名",
"is_extra": false,
"is_missing": false,
"is_required": true,
"label": "Preferred username",
"sso_field": [
"userName"
],
"user_attribute": "preferred_username"
},
{
"is_extra": true,
"is_missing": false,
"is_required": true,
"sso_field": [
"externalId"
],
"user_attribute": "external_id"
}
],
"display_name": "OIDC IdP",
"domains": [
"mydomain.com"
],
"id": "con_zW1UHutvkVWSWdCC",
"is_enabled": true,
"name": "oidcIdp",
"options": {
"client_id": "client_a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7did",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration",
"type": "front_channel"
},
"show_as_button": true,
"strategy": "oidc"
}組織のIDプロバイダーを作成
この組織に新しい IDプロバイダー を作成します。
POST
/
identity-providers
IDプロバイダーを作成する
curl --request POST \
--url https://{tenantDomain}/my-org/v1/identity-providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assign_membership_on_login": false,
"display_name": "OIDC IdP",
"domains": [
"mydomain.com"
],
"is_enabled": true,
"name": "oidcIdp",
"options": {
"client_id": "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
"client_secret": "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration",
"type": "front_channel"
},
"show_as_button": true,
"strategy": "oidc"
}
'import requests
url = "https://{tenantDomain}/my-org/v1/identity-providers"
payload = {
"assign_membership_on_login": False,
"display_name": "OIDC IdP",
"domains": ["mydomain.com"],
"is_enabled": True,
"name": "oidcIdp",
"options": {
"client_id": "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
"client_secret": "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration",
"type": "front_channel"
},
"show_as_button": True,
"strategy": "oidc"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assign_membership_on_login: false,
display_name: 'OIDC IdP',
domains: ['mydomain.com'],
is_enabled: true,
name: 'oidcIdp',
options: {
client_id: 'a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d',
client_secret: 'KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp',
discovery_url: 'https://{yourDomain}/.well-known/openid-configuration',
type: 'front_channel'
},
show_as_button: true,
strategy: 'oidc'
})
};
fetch('https://{tenantDomain}/my-org/v1/identity-providers', 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://{tenantDomain}/my-org/v1/identity-providers",
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([
'assign_membership_on_login' => false,
'display_name' => 'OIDC IdP',
'domains' => [
'mydomain.com'
],
'is_enabled' => true,
'name' => 'oidcIdp',
'options' => [
'client_id' => 'a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d',
'client_secret' => 'KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp',
'discovery_url' => 'https://{yourDomain}/.well-known/openid-configuration',
'type' => 'front_channel'
],
'show_as_button' => true,
'strategy' => 'oidc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://{tenantDomain}/my-org/v1/identity-providers"
payload := strings.NewReader("{\n \"assign_membership_on_login\": false,\n \"display_name\": \"OIDC IdP\",\n \"domains\": [\n \"mydomain.com\"\n ],\n \"is_enabled\": true,\n \"name\": \"oidcIdp\",\n \"options\": {\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\",\n \"type\": \"front_channel\"\n },\n \"show_as_button\": true,\n \"strategy\": \"oidc\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/my-org/v1/identity-providers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assign_membership_on_login\": false,\n \"display_name\": \"OIDC IdP\",\n \"domains\": [\n \"mydomain.com\"\n ],\n \"is_enabled\": true,\n \"name\": \"oidcIdp\",\n \"options\": {\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\",\n \"type\": \"front_channel\"\n },\n \"show_as_button\": true,\n \"strategy\": \"oidc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/identity-providers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assign_membership_on_login\": false,\n \"display_name\": \"OIDC IdP\",\n \"domains\": [\n \"mydomain.com\"\n ],\n \"is_enabled\": true,\n \"name\": \"oidcIdp\",\n \"options\": {\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\",\n \"type\": \"front_channel\"\n },\n \"show_as_button\": true,\n \"strategy\": \"oidc\"\n}"
response = http.request(request)
puts response.read_body{
"access_level": "full",
"assign_membership_on_login": false,
"attributes": [
{
"description": "希望するユーザー名",
"is_extra": false,
"is_missing": false,
"is_required": true,
"label": "Preferred username",
"sso_field": [
"userName"
],
"user_attribute": "preferred_username"
},
{
"is_extra": true,
"is_missing": false,
"is_required": true,
"sso_field": [
"externalId"
],
"user_attribute": "external_id"
}
],
"display_name": "OIDC IdP",
"domains": [
"mydomain.com"
],
"id": "con_zW1UHutvkVWSWdCC",
"is_enabled": true,
"name": "oidcIdp",
"options": {
"client_id": "client_a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7did",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration",
"type": "front_channel"
},
"show_as_button": true,
"strategy": "oidc"
}承認
OAuth2ClientCredentialsOAuth2AuthCode
The access token received from the authorization server in the OAuth 2.0 flow.
ボディ
application/json
- IdP ADFS Request
- IdP Google Workforce Request
- IdP OIDC Request
- IdP Okta Request
- IdP Ping Request
- IdP SAML Request
- IdP Microsoft Azure AD Request
IDプロバイダー固有のオプションです。
IDプロバイダーの名前
Required string length:
1 - 128IDプロバイダーの種類
利用可能なオプション:
adfs, google-apps, oidc, okta, pingfederate, samlp, waad Allowed value:
"adfs"IDプロバイダー固有のオプションです。
- adfs_server
- fedMetadataXml
Show child attributes
Show child attributes
true の場合、ユーザーはログイン時に組織のメンバーになります。
ログイン画面で使用される IDプロバイダー名。
Required string length:
1 - 128ホーム レルム ディスカバリー(HRD)用のドメイン一覧
IDプロバイダーが組織で有効になっている場合は true。
ログインページにこの接続のボタンを表示できるようにします(新しいエクスペリエンスのみ)。false の場合、ホーム レルム ディスカバリー(HRD)でのみ使用できます。
レスポンス
IDプロバイダーが正常に作成されました。
- IdP ADFS Response
- IdP Google Workforce Response
- IdP OIDC Response
- IdP Okta Response
- IdP Ping Response
- IdP SAML Response
- IdP Microsoft Azure AD Response
IDプロバイダー固有のオプションです。
IDプロバイダーの種類
利用可能なオプション:
adfs, google-apps, oidc, okta, pingfederate, samlp, waad Allowed value:
"adfs"IDプロバイダー固有のオプションです。
- adfs_server
- fedMetadataXml
Show child attributes
Show child attributes
利用可能なオプション:
none, readonly, limited, full true の場合、ユーザーはログイン時に組織のメンバーになります。
ログイン画面で使用される IDプロバイダー名。
Required string length:
1 - 128ホーム レルム ディスカバリー(HRD)用のドメイン一覧
IDプロバイダーの識別子。
Pattern:
^con_[A-Za-z0-9]{16}$IDプロバイダーが組織で有効になっている場合は true。
IDプロバイダーの名前
Maximum string length:
128ログインページにこの接続のボタンを表示できるようにします(新しいエクスペリエンスのみ)。false の場合、ホーム レルム ディスカバリー(HRD)でのみ使用できます。
⌘I