Python (SDK)
from meetkai_mka1 import SDK, models
with SDK() as sdk:
res = sdk.auth.orgs.update_sso_policy(security=models.UpdateSsoPolicySecurity(
session_cookie="<YOUR_API_KEY_HERE>",
), provider_id="<id>", enabled=False, groups_claim="<value>", mappings=[
{
"group_value": "<value>",
"role": "member",
},
])
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK();
async function run() {
const result = await sdk.auth.orgs.updateSsoPolicy({
sessionCookie: "<YOUR_API_KEY_HERE>",
}, {
requestBody: {
providerId: "<id>",
enabled: false,
groupsClaim: "<value>",
mappings: [
{
groupValue: "<value>",
role: "member",
},
],
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
using System.Collections.Generic;
var sdk = new SDK();
var res = await sdk.Auth.Orgs.UpdateSsoPolicyAsync(
security: new UpdateSsoPolicySecurity() {
SessionCookie = "<YOUR_API_KEY_HERE>",
},
body: new UpdateSsoPolicyRequestBody() {
ProviderId = "<id>",
Enabled = false,
GroupsClaim = "<value>",
Mappings = new List<MappingRequest>() {
new MappingRequest() {
GroupValue = "<value>",
Role = UpdateSsoPolicyRoleRequest.Member,
},
},
}
);
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/authentication/sso/policy \
--header 'Content-Type: application/json' \
--cookie __Secure-mka1-auth-v2.session_token= \
--data '
{
"providerId": "<string>",
"enabled": true,
"groupsClaim": "<string>",
"mappings": [
{
"groupValue": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {
cookie: '__Secure-mka1-auth-v2.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
providerId: '<string>',
enabled: true,
groupsClaim: '<string>',
mappings: [{groupValue: '<string>'}]
})
};
fetch('https://apigw.mka1.com/api/v1/authentication/sso/policy', 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://apigw.mka1.com/api/v1/authentication/sso/policy",
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([
'providerId' => '<string>',
'enabled' => true,
'groupsClaim' => '<string>',
'mappings' => [
[
'groupValue' => '<string>'
]
]
]),
CURLOPT_COOKIE => "__Secure-mka1-auth-v2.session_token=",
CURLOPT_HTTPHEADER => [
"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://apigw.mka1.com/api/v1/authentication/sso/policy"
payload := strings.NewReader("{\n \"providerId\": \"<string>\",\n \"enabled\": true,\n \"groupsClaim\": \"<string>\",\n \"mappings\": [\n {\n \"groupValue\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-mka1-auth-v2.session_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://apigw.mka1.com/api/v1/authentication/sso/policy")
.header("cookie", "__Secure-mka1-auth-v2.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"providerId\": \"<string>\",\n \"enabled\": true,\n \"groupsClaim\": \"<string>\",\n \"mappings\": [\n {\n \"groupValue\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/sso/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Secure-mka1-auth-v2.session_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"providerId\": \"<string>\",\n \"enabled\": true,\n \"groupsClaim\": \"<string>\",\n \"mappings\": [\n {\n \"groupValue\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"providerId": "<string>",
"enabled": true,
"groupsClaim": "<string>",
"mappings": [
{
"groupValue": "<string>",
"role": "member"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Organization
Atualizar a política de mapeamento de funções do SSO empresarial
Requer uma sessão de navegador humana ao vivo e associação atual de proprietário/admin. A ativação de uma conexão requer propriedade de domínio verificada. Mapeamentos exatos de grupos do IdP concedem membro ou admin em logins SSO subsequentes; os proprietários são preservados.
POST
/
api
/
v1
/
authentication
/
sso
/
policy
Python (SDK)
from meetkai_mka1 import SDK, models
with SDK() as sdk:
res = sdk.auth.orgs.update_sso_policy(security=models.UpdateSsoPolicySecurity(
session_cookie="<YOUR_API_KEY_HERE>",
), provider_id="<id>", enabled=False, groups_claim="<value>", mappings=[
{
"group_value": "<value>",
"role": "member",
},
])
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK();
async function run() {
const result = await sdk.auth.orgs.updateSsoPolicy({
sessionCookie: "<YOUR_API_KEY_HERE>",
}, {
requestBody: {
providerId: "<id>",
enabled: false,
groupsClaim: "<value>",
mappings: [
{
groupValue: "<value>",
role: "member",
},
],
},
});
console.log(result);
}
run();using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
using System.Collections.Generic;
var sdk = new SDK();
var res = await sdk.Auth.Orgs.UpdateSsoPolicyAsync(
security: new UpdateSsoPolicySecurity() {
SessionCookie = "<YOUR_API_KEY_HERE>",
},
body: new UpdateSsoPolicyRequestBody() {
ProviderId = "<id>",
Enabled = false,
GroupsClaim = "<value>",
Mappings = new List<MappingRequest>() {
new MappingRequest() {
GroupValue = "<value>",
Role = UpdateSsoPolicyRoleRequest.Member,
},
},
}
);
// handle responsecurl --request POST \
--url https://apigw.mka1.com/api/v1/authentication/sso/policy \
--header 'Content-Type: application/json' \
--cookie __Secure-mka1-auth-v2.session_token= \
--data '
{
"providerId": "<string>",
"enabled": true,
"groupsClaim": "<string>",
"mappings": [
{
"groupValue": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {
cookie: '__Secure-mka1-auth-v2.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
providerId: '<string>',
enabled: true,
groupsClaim: '<string>',
mappings: [{groupValue: '<string>'}]
})
};
fetch('https://apigw.mka1.com/api/v1/authentication/sso/policy', 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://apigw.mka1.com/api/v1/authentication/sso/policy",
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([
'providerId' => '<string>',
'enabled' => true,
'groupsClaim' => '<string>',
'mappings' => [
[
'groupValue' => '<string>'
]
]
]),
CURLOPT_COOKIE => "__Secure-mka1-auth-v2.session_token=",
CURLOPT_HTTPHEADER => [
"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://apigw.mka1.com/api/v1/authentication/sso/policy"
payload := strings.NewReader("{\n \"providerId\": \"<string>\",\n \"enabled\": true,\n \"groupsClaim\": \"<string>\",\n \"mappings\": [\n {\n \"groupValue\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Secure-mka1-auth-v2.session_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://apigw.mka1.com/api/v1/authentication/sso/policy")
.header("cookie", "__Secure-mka1-auth-v2.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"providerId\": \"<string>\",\n \"enabled\": true,\n \"groupsClaim\": \"<string>\",\n \"mappings\": [\n {\n \"groupValue\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/sso/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Secure-mka1-auth-v2.session_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"providerId\": \"<string>\",\n \"enabled\": true,\n \"groupsClaim\": \"<string>\",\n \"mappings\": [\n {\n \"groupValue\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"providerId": "<string>",
"enabled": true,
"groupsClaim": "<string>",
"mappings": [
{
"groupValue": "<string>",
"role": "member"
}
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Autorizações
Current Better Auth browser or device-login session
Cabeçalhos
Optional external end-user identifier forwarded by the API gateway.
Corpo
application/json
Esta página foi útil?
⌘I