import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.identityProviders.update("idp_id", {
display_name: "OIDC IdP",
show_as_button: true,
assign_membership_on_login: false,
is_enabled: true,
options: {
type: "front_channel",
client_id: "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
client_secret: "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
discovery_url: "https://{yourDomain}/.well-known/openid-configuration",
},
});
}
main();
import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.identityProviders.update("idp_id", {
display_name: "OIDC IdP",
show_as_button: true,
assign_membership_on_login: false,
is_enabled: true,
options: {
type: "front_channel",
client_id: "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
client_secret: "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
discovery_url: "https://{yourDomain}/.well-known/openid-configuration",
},
});
}
main();
package example
import (
context "context"
myorganization "github.com/auth0/myorganization-go/v2"
client "github.com/auth0/myorganization-go/v2/client"
option "github.com/auth0/myorganization-go/v2/option"
)
func do() {
c, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &myorganization.IdpUpdateKnownRequest{
IdpOidcUpdateRequest: &myorganization.IdpOidcUpdateRequest{
DisplayName: myorganization.String(
"OIDC IdP",
),
ShowAsButton: myorganization.Bool(
true,
),
AssignMembershipOnLogin: myorganization.Bool(
false,
),
IsEnabled: myorganization.Bool(
true,
),
Options: &myorganization.IdpOidcOptionsRequest{
Type: myorganization.IdpOidcOptionsTypeEnumFrontChannel,
ClientID: "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
ClientSecret: myorganization.String(
"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
),
DiscoveryURL: "https://{yourDomain}/.well-known/openid-configuration",
},
},
}
c.Organization.IdentityProviders.Update(
context.TODO(),
"idp_id",
request,
)
}
using Auth0.MyOrganizationApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new MyOrganizationClient(new MyOrganizationClientOptions
{
Domain = "{YOUR_DOMAIN}",
TokenProvider = new DelegateTokenProvider(_ => Task.FromResult("<token>"))
});
await client.Organization.IdentityProviders.UpdateAsync(
idpId: "idp_id",
request: new IdpOidcUpdateRequest {
DisplayName = "OIDC IdP",
ShowAsButton = true,
AssignMembershipOnLogin = false,
IsEnabled = true,
Options = new IdpOidcOptionsRequest {
Type = IdpOidcOptionsTypeEnum.FrontChannel,
ClientId = "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
ClientSecret = "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
DiscoveryUrl = "https://{yourDomain}/.well-known/openid-configuration"
}
}
);
}
}
package com.example.usage;
import com.auth0.client.myorganization.auth.MyOrganizationClient;
import com.auth0.client.myorganization.types.IdpOidcOptionsRequest;
import com.auth0.client.myorganization.types.IdpOidcOptionsTypeEnum;
import com.auth0.client.myorganization.types.IdpOidcUpdateRequest;
import com.auth0.client.myorganization.types.IdpUpdateKnownRequest;
import java.util.Optional;
public class Example {
public static void main(String[] args) {
MyOrganizationClient client = MyOrganizationClient
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organization().identityProviders().update(
"idp_id",
IdpUpdateKnownRequest.of(
IdpOidcUpdateRequest
.builder()
.displayName(Optional.of("OIDC IdP"))
.showAsButton(Optional.of(true))
.assignMembershipOnLogin(Optional.of(false))
.isEnabled(Optional.of(true))
.options(
Optional.of(
IdpOidcOptionsRequest
.builder()
.type(IdpOidcOptionsTypeEnum.FRONT_CHANNEL)
.clientId("a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d")
.discoveryUrl("https://{yourDomain}/.well-known/openid-configuration")
.clientSecret(Optional.of("KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp"))
.build()
)
)
.build()
)
);
}
}from auth0.myorganization import MyOrganizationClient, IdpOidcUpdateRequest, IdpOidcOptionsRequest
client = MyOrganizationClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organization.identity_providers.update(
idp_id="idp_id",
request=IdpOidcUpdateRequest(
display_name="OIDC IdP",
show_as_button=True,
assign_membership_on_login=False,
is_enabled=True,
options=IdpOidcOptionsRequest(
type="front_channel",
client_id="a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
client_secret="KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
discovery_url="https://{yourDomain}/.well-known/openid-configuration",
),
),
)
curl --request PATCH \
--url https://{tenantDomain}/my-org/v1/identity-providers/{idp_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "OIDC IdP",
"show_as_button": true,
"assign_membership_on_login": false,
"is_enabled": true,
"options": {
"type": "front_channel",
"client_id": "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
"client_secret": "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/my-org/v1/identity-providers/{idp_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'OIDC IdP',
'show_as_button' => true,
'assign_membership_on_login' => false,
'is_enabled' => true,
'options' => [
'type' => 'front_channel',
'client_id' => 'a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d',
'client_secret' => 'KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp',
'discovery_url' => 'https://{yourDomain}/.well-known/openid-configuration'
]
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/identity-providers/{idp_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"OIDC IdP\",\n \"show_as_button\": true,\n \"assign_membership_on_login\": false,\n \"is_enabled\": true,\n \"options\": {\n \"type\": \"front_channel\",\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\"\n }\n}"
response = http.request(request)
puts response.read_bodyIDプロバイダーを更新
この組織の、ID で指定された IDプロバイダーの詳細を更新します。
import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.identityProviders.update("idp_id", {
display_name: "OIDC IdP",
show_as_button: true,
assign_membership_on_login: false,
is_enabled: true,
options: {
type: "front_channel",
client_id: "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
client_secret: "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
discovery_url: "https://{yourDomain}/.well-known/openid-configuration",
},
});
}
main();
import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.identityProviders.update("idp_id", {
display_name: "OIDC IdP",
show_as_button: true,
assign_membership_on_login: false,
is_enabled: true,
options: {
type: "front_channel",
client_id: "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
client_secret: "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
discovery_url: "https://{yourDomain}/.well-known/openid-configuration",
},
});
}
main();
package example
import (
context "context"
myorganization "github.com/auth0/myorganization-go/v2"
client "github.com/auth0/myorganization-go/v2/client"
option "github.com/auth0/myorganization-go/v2/option"
)
func do() {
c, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &myorganization.IdpUpdateKnownRequest{
IdpOidcUpdateRequest: &myorganization.IdpOidcUpdateRequest{
DisplayName: myorganization.String(
"OIDC IdP",
),
ShowAsButton: myorganization.Bool(
true,
),
AssignMembershipOnLogin: myorganization.Bool(
false,
),
IsEnabled: myorganization.Bool(
true,
),
Options: &myorganization.IdpOidcOptionsRequest{
Type: myorganization.IdpOidcOptionsTypeEnumFrontChannel,
ClientID: "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
ClientSecret: myorganization.String(
"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
),
DiscoveryURL: "https://{yourDomain}/.well-known/openid-configuration",
},
},
}
c.Organization.IdentityProviders.Update(
context.TODO(),
"idp_id",
request,
)
}
using Auth0.MyOrganizationApi;
using System.Threading.Tasks;
public partial class Examples
{
public async Task Example() {
var client = new MyOrganizationClient(new MyOrganizationClientOptions
{
Domain = "{YOUR_DOMAIN}",
TokenProvider = new DelegateTokenProvider(_ => Task.FromResult("<token>"))
});
await client.Organization.IdentityProviders.UpdateAsync(
idpId: "idp_id",
request: new IdpOidcUpdateRequest {
DisplayName = "OIDC IdP",
ShowAsButton = true,
AssignMembershipOnLogin = false,
IsEnabled = true,
Options = new IdpOidcOptionsRequest {
Type = IdpOidcOptionsTypeEnum.FrontChannel,
ClientId = "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
ClientSecret = "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
DiscoveryUrl = "https://{yourDomain}/.well-known/openid-configuration"
}
}
);
}
}
package com.example.usage;
import com.auth0.client.myorganization.auth.MyOrganizationClient;
import com.auth0.client.myorganization.types.IdpOidcOptionsRequest;
import com.auth0.client.myorganization.types.IdpOidcOptionsTypeEnum;
import com.auth0.client.myorganization.types.IdpOidcUpdateRequest;
import com.auth0.client.myorganization.types.IdpUpdateKnownRequest;
import java.util.Optional;
public class Example {
public static void main(String[] args) {
MyOrganizationClient client = MyOrganizationClient
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organization().identityProviders().update(
"idp_id",
IdpUpdateKnownRequest.of(
IdpOidcUpdateRequest
.builder()
.displayName(Optional.of("OIDC IdP"))
.showAsButton(Optional.of(true))
.assignMembershipOnLogin(Optional.of(false))
.isEnabled(Optional.of(true))
.options(
Optional.of(
IdpOidcOptionsRequest
.builder()
.type(IdpOidcOptionsTypeEnum.FRONT_CHANNEL)
.clientId("a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d")
.discoveryUrl("https://{yourDomain}/.well-known/openid-configuration")
.clientSecret(Optional.of("KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp"))
.build()
)
)
.build()
)
);
}
}from auth0.myorganization import MyOrganizationClient, IdpOidcUpdateRequest, IdpOidcOptionsRequest
client = MyOrganizationClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organization.identity_providers.update(
idp_id="idp_id",
request=IdpOidcUpdateRequest(
display_name="OIDC IdP",
show_as_button=True,
assign_membership_on_login=False,
is_enabled=True,
options=IdpOidcOptionsRequest(
type="front_channel",
client_id="a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
client_secret="KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
discovery_url="https://{yourDomain}/.well-known/openid-configuration",
),
),
)
curl --request PATCH \
--url https://{tenantDomain}/my-org/v1/identity-providers/{idp_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "OIDC IdP",
"show_as_button": true,
"assign_membership_on_login": false,
"is_enabled": true,
"options": {
"type": "front_channel",
"client_id": "a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d",
"client_secret": "KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp",
"discovery_url": "https://{yourDomain}/.well-known/openid-configuration"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/my-org/v1/identity-providers/{idp_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => 'OIDC IdP',
'show_as_button' => true,
'assign_membership_on_login' => false,
'is_enabled' => true,
'options' => [
'type' => 'front_channel',
'client_id' => 'a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d',
'client_secret' => 'KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp',
'discovery_url' => 'https://{yourDomain}/.well-known/openid-configuration'
]
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/identity-providers/{idp_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"display_name\": \"OIDC IdP\",\n \"show_as_button\": true,\n \"assign_membership_on_login\": false,\n \"is_enabled\": true,\n \"options\": {\n \"type\": \"front_channel\",\n \"client_id\": \"a8f3b2e7-5d1c-4f9a-8b0d-2e1c3a5b6f7d\",\n \"client_secret\": \"KzQp2sVxR8nTgMjFhYcEWuLoIbDvUoC6A9B1zX7yWqFjHkGrP5sQdLmNp\",\n \"discovery_url\": \"https://{yourDomain}/.well-known/openid-configuration\"\n }\n}"
response = http.request(request)
puts response.read_body承認
The access token received from the authorization server in the OAuth 2.0 flow.
パスパラメータ
IDプロバイダーの識別子。
^con_[A-Za-z0-9]{16}$ボディ
- IdP ADFS Update Request
- IdP Google Workforce Update Request
- IdP OIDC Update Request
- IdP Okta Update Request
- IdP Ping Update Request
- IdP SAML Update Request
- IdP Microsoft Azure AD Update Request
ログイン画面で使用されるアイデンティティプロバイダー名。access_level は 'full' である必要があります
1 - 128ログインページにこの接続のボタンを表示できるようにします(新しいエクスペリエンスのみ)。false の場合は、ホームレルムディスカバリー(HRD)でのみ使用できます。access_level は 'full' または 'limited' である必要があります
true の場合、ユーザーはログイン時に組織のメンバーになります。access_level は 'full' または 'limited' である必要があります。
アイデンティティプロバイダーが組織に対して有効な場合は true。access_level は 'full' または 'limited' である必要があります
サードパーティアプリケーションが使用できる場合はTrueです。falseの場合、接続が有効になっているファーストパーティアプリケーションのみが使用できます。access_levelが'full'である必要があります。デフォルトはfalseです。
クロスアプリアクセスリソースアプリケーションの設定。organizationでクロスアプリアクセスリソースアプリケーション機能が有効な場合にのみ存在します。
Show child attributes
Show child attributes
IDプロバイダー固有のオプション。access_level が 'full' である必要があります。
- adfs_server
- fedMetadataXml
Show child attributes
Show child attributes
レスポンス
アイデンティティプロバイダーが正常に更新されました。
- 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プロバイダー固有のオプション。
アイデンティティプロバイダーの種類
adfs, google-apps, oidc, okta, pingfederate, samlp, waad "adfs"IDプロバイダーの識別子。
^con_[A-Za-z0-9]{16}$アイデンティティプロバイダーの名前
128ホームレルムディスカバリー(HRD)用ドメインの一覧
ログイン画面で使用されるIDプロバイダー名。
1 - 128ログインページにこの接続のボタンを表示できるようにします(新しいエクスペリエンスのみ)。false の場合は、ホームレルムディスカバリー(HRD)でのみ使用できます。
true の場合、ユーザーはログイン時に組織のメンバーになります。
アイデンティティプロバイダーが組織に対して有効な場合は true。
組織に許可されるアクセスレベル
none, readonly, limited, full この接続の Organization メンバーアクセスレベル。
none, readonly, limited, full サードパーティアプリケーションが使用できる場合はTrueです。falseの場合、接続が有効になっているファーストパーティアプリケーションのみが使用できます。デフォルトはfalseです。
クロスアプリアクセスリソースアプリケーションの設定。organizationでクロスアプリアクセスリソースアプリケーション機能が有効な場合にのみ存在します。
Show child attributes
Show child attributes
IDプロバイダー固有のオプション。
- adfs_server
- fedMetadataXml
Show child attributes
Show child attributes