Auth0

Pulumi Official
Package maintained by Pulumi
v2.11.0 published on Monday, Jul 25, 2022 by Pulumi

Organization

The Organizations feature represents a broad update to the Auth0 platform that allows our business-to-business (B2B) customers to better manage their partners and customers, and to customize the ways that end-users access their applications. Auth0 customers can use Organizations to:

  • Represent their business customers and partners in Auth0 and manage their membership.
  • Configure branded, federated login flows for each business.
  • Build administration capabilities into their products, using Organizations APIs, so that those businesses can manage their own organizations.

Example Usage

using Pulumi;
using Auth0 = Pulumi.Auth0;

class MyStack : Stack
{
    public MyStack()
    {
        var acme = new Auth0.Organization("acme", new Auth0.OrganizationArgs
        {
            DisplayName = "Acme Inc.",
            Branding = new Auth0.Inputs.OrganizationBrandingArgs
            {
                LogoUrl = "https://acme.com/logo.svg",
                Colors = 
                {
                    { "primary", "#e3e2f0" },
                    { "page_background", "#e3e2ff" },
                },
            },
            Connections = 
            {
                new Auth0.Inputs.OrganizationConnectionArgs
                {
                    ConnectionId = auth0_connection.Acme.Id,
                    AssignMembershipOnLogin = true,
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-auth0/sdk/v2/go/auth0"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := auth0.NewOrganization(ctx, "acme", &auth0.OrganizationArgs{
			DisplayName: pulumi.String("Acme Inc."),
			Branding: &OrganizationBrandingArgs{
				LogoUrl: pulumi.String("https://acme.com/logo.svg"),
				Colors: pulumi.StringMap{
					"primary":         pulumi.String("#e3e2f0"),
					"page_background": pulumi.String("#e3e2ff"),
				},
			},
			Connections: OrganizationConnectionTypeArray{
				&OrganizationConnectionTypeArgs{
					ConnectionId:            pulumi.Any(auth0_connection.Acme.Id),
					AssignMembershipOnLogin: pulumi.Bool(true),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.auth0.Organization;
import com.pulumi.auth0.OrganizationArgs;
import com.pulumi.auth0.inputs.OrganizationBrandingArgs;
import com.pulumi.auth0.inputs.OrganizationConnectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var acme = new Organization("acme", OrganizationArgs.builder()        
            .displayName("Acme Inc.")
            .branding(OrganizationBrandingArgs.builder()
                .logoUrl("https://acme.com/logo.svg")
                .colors(Map.ofEntries(
                    Map.entry("primary", "#e3e2f0"),
                    Map.entry("page_background", "#e3e2ff")
                ))
                .build())
            .connections(OrganizationConnectionArgs.builder()
                .connectionId(auth0_connection.acme().id())
                .assignMembershipOnLogin(true)
                .build())
            .build());

    }
}
import pulumi
import pulumi_auth0 as auth0

acme = auth0.Organization("acme",
    display_name="Acme Inc.",
    branding=auth0.OrganizationBrandingArgs(
        logo_url="https://acme.com/logo.svg",
        colors={
            "primary": "#e3e2f0",
            "page_background": "#e3e2ff",
        },
    ),
    connections=[auth0.OrganizationConnectionArgs(
        connection_id=auth0_connection["acme"]["id"],
        assign_membership_on_login=True,
    )])
import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";

const acme = new auth0.Organization("acme", {
    displayName: "Acme Inc.",
    branding: {
        logoUrl: "https://acme.com/logo.svg",
        colors: {
            primary: "#e3e2f0",
            page_background: "#e3e2ff",
        },
    },
    connections: [{
        connectionId: auth0_connection.acme.id,
        assignMembershipOnLogin: true,
    }],
});
resources:
  acme:
    type: auth0:Organization
    properties:
      displayName: Acme Inc.
      branding:
        logoUrl: https://acme.com/logo.svg
        colors:
          primary: '#e3e2f0'
          page_background: '#e3e2ff'
      connections:
        - connectionId: ${auth0_connection.acme.id}
          assignMembershipOnLogin: true

Create a Organization Resource

new Organization(name: string, args?: OrganizationArgs, opts?: CustomResourceOptions);
@overload
def Organization(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 branding: Optional[OrganizationBrandingArgs] = None,
                 connections: Optional[Sequence[OrganizationConnectionArgs]] = None,
                 display_name: Optional[str] = None,
                 metadata: Optional[Mapping[str, str]] = None,
                 name: Optional[str] = None)
@overload
def Organization(resource_name: str,
                 args: Optional[OrganizationArgs] = None,
                 opts: Optional[ResourceOptions] = None)
func NewOrganization(ctx *Context, name string, args *OrganizationArgs, opts ...ResourceOption) (*Organization, error)
public Organization(string name, OrganizationArgs? args = null, CustomResourceOptions? opts = null)
public Organization(String name, OrganizationArgs args)
public Organization(String name, OrganizationArgs args, CustomResourceOptions options)
type: auth0:Organization
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args OrganizationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args OrganizationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args OrganizationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args OrganizationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args OrganizationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Organization Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Organization resource accepts the following input properties:

Branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

Connections List<OrganizationConnectionArgs>

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

DisplayName string

Friendly name of this organization

Metadata Dictionary<string, string>

Metadata associated with the organization, Maximum of 10 metadata properties allowed

Name string

The name of this organization

Branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

Connections []OrganizationConnectionTypeArgs

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

DisplayName string

Friendly name of this organization

Metadata map[string]string

Metadata associated with the organization, Maximum of 10 metadata properties allowed

Name string

The name of this organization

branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

connections List<OrganizationConnectionArgs>

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

displayName String

Friendly name of this organization

metadata Map<String,String>

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name String

The name of this organization

branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

connections OrganizationConnectionArgs[]

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

displayName string

Friendly name of this organization

metadata {[key: string]: string}

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name string

The name of this organization

branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

connections Sequence[OrganizationConnectionArgs]

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

display_name str

Friendly name of this organization

metadata Mapping[str, str]

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name str

The name of this organization

branding Property Map

Defines how to style the login pages. For details, see Branding

connections List<Property Map>

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

displayName String

Friendly name of this organization

metadata Map<String>

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name String

The name of this organization

Outputs

All input properties are implicitly available as output properties. Additionally, the Organization resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Organization Resource

Get an existing Organization resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: OrganizationState, opts?: CustomResourceOptions): Organization
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        branding: Optional[OrganizationBrandingArgs] = None,
        connections: Optional[Sequence[OrganizationConnectionArgs]] = None,
        display_name: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None) -> Organization
func GetOrganization(ctx *Context, name string, id IDInput, state *OrganizationState, opts ...ResourceOption) (*Organization, error)
public static Organization Get(string name, Input<string> id, OrganizationState? state, CustomResourceOptions? opts = null)
public static Organization get(String name, Output<String> id, OrganizationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

Connections List<OrganizationConnectionArgs>

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

DisplayName string

Friendly name of this organization

Metadata Dictionary<string, string>

Metadata associated with the organization, Maximum of 10 metadata properties allowed

Name string

The name of this organization

Branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

Connections []OrganizationConnectionTypeArgs

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

DisplayName string

Friendly name of this organization

Metadata map[string]string

Metadata associated with the organization, Maximum of 10 metadata properties allowed

Name string

The name of this organization

branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

connections List<OrganizationConnectionArgs>

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

displayName String

Friendly name of this organization

metadata Map<String,String>

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name String

The name of this organization

branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

connections OrganizationConnectionArgs[]

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

displayName string

Friendly name of this organization

metadata {[key: string]: string}

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name string

The name of this organization

branding OrganizationBrandingArgs

Defines how to style the login pages. For details, see Branding

connections Sequence[OrganizationConnectionArgs]

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

display_name str

Friendly name of this organization

metadata Mapping[str, str]

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name str

The name of this organization

branding Property Map

Defines how to style the login pages. For details, see Branding

connections List<Property Map>

Connections assigned to the organization. For details, see Connections

Deprecated:

Management of organizations through this property has been deprecated in favor of the auth0_organization_connection resource and will be deleted in future versions. It is advised to migrate all managed organization connections to the new resource type.

displayName String

Friendly name of this organization

metadata Map<String>

Metadata associated with the organization, Maximum of 10 metadata properties allowed

name String

The name of this organization

Supporting Types

OrganizationBranding

Colors Dictionary<string, string>

Color scheme used to customize the login pages

LogoUrl string

URL of logo to display on login page

Colors map[string]string

Color scheme used to customize the login pages

LogoUrl string

URL of logo to display on login page

colors Map<String,String>

Color scheme used to customize the login pages

logoUrl String

URL of logo to display on login page

colors {[key: string]: string}

Color scheme used to customize the login pages

logoUrl string

URL of logo to display on login page

colors Mapping[str, str]

Color scheme used to customize the login pages

logo_url str

URL of logo to display on login page

colors Map<String>

Color scheme used to customize the login pages

logoUrl String

URL of logo to display on login page

OrganizationConnection

ConnectionId string

The connection ID of the connection to add to the organization

AssignMembershipOnLogin bool

When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.

ConnectionId string

The connection ID of the connection to add to the organization

AssignMembershipOnLogin bool

When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.

connectionId String

The connection ID of the connection to add to the organization

assignMembershipOnLogin Boolean

When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.

connectionId string

The connection ID of the connection to add to the organization

assignMembershipOnLogin boolean

When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.

connection_id str

The connection ID of the connection to add to the organization

assign_membership_on_login bool

When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.

connectionId String

The connection ID of the connection to add to the organization

assignMembershipOnLogin Boolean

When true, all users that log in with this connection will be automatically granted membership in the organization. When false, users must be granted membership in the organization before logging in with this connection.

Import

Existing organizations can be imported using organization id, e.g.

 $ pulumi import auth0:index/organization:Organization acme org_XXXXXXXXXXXXXX

Package Details

Repository
https://github.com/pulumi/pulumi-auth0
License
Apache-2.0
Notes

This Pulumi package is based on the auth0 Terraform Provider.