Passer au contenu principal
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"
                    },
                }

            }
        );
    }

}
{
  "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": {}
}

Autorisations

Authorization
string
header
requis

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

Corps

name
string
requis

The name of the user attribute profile.

Required string length: 1 - 128
user_attributes
object
requis

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

user_id
object

User ID mapping configuration

Réponse

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.