メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
user-attribute-profiles
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.UserAttributeProfiles.CreateAsync(
            new CreateUserAttributeProfileRequestContent {
                Name = "name",
                UserAttributes = new Dictionary<string, UserAttributeProfileUserAttributeAdditionalProperties>(){
                    ["key"] = new UserAttributeProfileUserAttributeAdditionalProperties {
                        Description = "description",
                        Label = "label",
                        ProfileRequired = true,
                        Auth0Mapping = "auth0_mapping"
                    },
                }

            }
        );
    }

}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.userattributeprofiles.requests.CreateUserAttributeProfileRequestContent;
import com.auth0.client.mgmt.types.UserAttributeProfileUserAttributeAdditionalProperties;
import java.util.HashMap;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.userAttributeProfiles().create(
CreateUserAttributeProfileRequestContent
.builder()
.name("name")
.userAttributes(
new HashMap<String, UserAttributeProfileUserAttributeAdditionalProperties>() {{
put("key", UserAttributeProfileUserAttributeAdditionalProperties
.builder()
.description("description")
.label("label")
.profileRequired(true)
.auth0Mapping("auth0_mapping")
.build());
}}
)
.build()
);
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\UserAttributeProfiles\Requests\CreateUserAttributeProfileRequestContent;
use Auth0\SDK\API\Management\Types\UserAttributeProfileUserAttributeAdditionalProperties;

$client = new Management(
token: '<token>',
);
$client->userAttributeProfiles->create(
new CreateUserAttributeProfileRequestContent([
'name' => 'name',
'userAttributes' => [
'key' => new UserAttributeProfileUserAttributeAdditionalProperties([
'description' => 'description',
'label' => 'label',
'profileRequired' => true,
'auth0Mapping' => 'auth0_mapping',
]),
],
]),
);
from auth0.management import ManagementClient, UserAttributeProfileUserAttributeAdditionalProperties

client = ManagementClient(
token="<token>",
)

client.user_attribute_profiles.create(
name="name",
user_attributes={
"key": UserAttributeProfileUserAttributeAdditionalProperties(
description="description",
label="label",
profile_required=True,
auth_0_mapping="auth0_mapping",
)
},
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.user_attribute_profiles.create(
name: "name",
user_attributes: {
key: {
description: "description",
label: "label",
profile_required: true,
auth_0_mapping: "auth0_mapping"
}
}
)
curl --request POST \
--url https://{tenantDomain}/api/v2/user-attribute-profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"user_attributes": {},
"user_id": {
"oidc_mapping": "sub",
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>",
"strategy_overrides": {
"pingfederate": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"ad": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"adfs": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"waad": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"google-apps": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"okta": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"oidc": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
},
"samlp": {
"saml_mapping": [
"<string>"
],
"scim_mapping": "<string>"
}
}
}
}
'
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
user_attributes: {},
user_id: {
oidc_mapping: 'sub',
saml_mapping: ['<string>'],
scim_mapping: '<string>',
strategy_overrides: {
pingfederate: {saml_mapping: ['<string>'], scim_mapping: '<string>'},
ad: {saml_mapping: ['<string>'], scim_mapping: '<string>'},
adfs: {saml_mapping: ['<string>'], scim_mapping: '<string>'},
waad: {saml_mapping: ['<string>'], scim_mapping: '<string>'},
'google-apps': {saml_mapping: ['<string>'], scim_mapping: '<string>'},
okta: {saml_mapping: ['<string>'], scim_mapping: '<string>'},
oidc: {saml_mapping: ['<string>'], scim_mapping: '<string>'},
samlp: {saml_mapping: ['<string>'], scim_mapping: '<string>'}
}
}
})
};

fetch('https://{tenantDomain}/api/v2/user-attribute-profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{tenantDomain}/api/v2/user-attribute-profiles"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"user_attributes\": {},\n \"user_id\": {\n \"oidc_mapping\": \"sub\",\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\",\n \"strategy_overrides\": {\n \"pingfederate\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"ad\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"adfs\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"waad\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"google-apps\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"okta\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"oidc\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n },\n \"samlp\": {\n \"saml_mapping\": [\n \"<string>\"\n ],\n \"scim_mapping\": \"<string>\"\n }\n }\n }\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))

}
{
  "id": "<string>",
  "name": "<string>",
  "user_id": {
    "oidc_mapping": "sub",
    "saml_mapping": [
      "<string>"
    ],
    "scim_mapping": "<string>",
    "strategy_overrides": {
      "pingfederate": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "ad": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "adfs": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "waad": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "google-apps": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "okta": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "oidc": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      },
      "samlp": {
        "saml_mapping": [
          "<string>"
        ],
        "scim_mapping": "<string>"
      }
    }
  },
  "user_attributes": {}
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

name
string
必須

The name of the user attribute profile.

Required string length: 1 - 128
user_attributes
object
必須

User attributes configuration map. Keys are attribute names, values are the mapping configuration for each attribute.

user_id
object

User ID mapping configuration

レスポンス

User attribute successfully created.

id
string<user-attribute-profile-id>

User Attribute Profile identifier.

name
string

The name of the user attribute profile.

Required string length: 1 - 128
user_id
object

User ID mapping configuration

user_attributes
object

User attributes configuration map. Keys are attribute names, values are the mapping configuration for each attribute.