1. Packages
  2. Auth0 Provider
  3. API Docs
  4. getOrganization
Auth0 v3.17.1 published on Tuesday, Apr 15, 2025 by Pulumi

auth0.getOrganization

Explore with Pulumi AI

Auth0 v3.17.1 published on Tuesday, Apr 15, 2025 by Pulumi

Data source to retrieve a specific Auth0 organization by organization_id or name.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as auth0 from "@pulumi/auth0";

// An Auth0 Organization loaded using its name.
const some_organization_by_name = auth0.getOrganization({
    name: "my-org",
});
// An Auth0 Organization loaded using its ID.
const some_organization_by_id = auth0.getOrganization({
    organizationId: "org_abcdefghkijklmnopqrstuvwxyz0123456789",
});
Copy
import pulumi
import pulumi_auth0 as auth0

# An Auth0 Organization loaded using its name.
some_organization_by_name = auth0.get_organization(name="my-org")
# An Auth0 Organization loaded using its ID.
some_organization_by_id = auth0.get_organization(organization_id="org_abcdefghkijklmnopqrstuvwxyz0123456789")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// An Auth0 Organization loaded using its name.
		_, err := auth0.LookupOrganization(ctx, &auth0.LookupOrganizationArgs{
			Name: pulumi.StringRef("my-org"),
		}, nil)
		if err != nil {
			return err
		}
		// An Auth0 Organization loaded using its ID.
		_, err = auth0.LookupOrganization(ctx, &auth0.LookupOrganizationArgs{
			OrganizationId: pulumi.StringRef("org_abcdefghkijklmnopqrstuvwxyz0123456789"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Auth0 = Pulumi.Auth0;

return await Deployment.RunAsync(() => 
{
    // An Auth0 Organization loaded using its name.
    var some_organization_by_name = Auth0.GetOrganization.Invoke(new()
    {
        Name = "my-org",
    });

    // An Auth0 Organization loaded using its ID.
    var some_organization_by_id = Auth0.GetOrganization.Invoke(new()
    {
        OrganizationId = "org_abcdefghkijklmnopqrstuvwxyz0123456789",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.auth0.Auth0Functions;
import com.pulumi.auth0.inputs.GetOrganizationArgs;
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) {
        // An Auth0 Organization loaded using its name.
        final var some-organization-by-name = Auth0Functions.getOrganization(GetOrganizationArgs.builder()
            .name("my-org")
            .build());

        // An Auth0 Organization loaded using its ID.
        final var some-organization-by-id = Auth0Functions.getOrganization(GetOrganizationArgs.builder()
            .organizationId("org_abcdefghkijklmnopqrstuvwxyz0123456789")
            .build());

    }
}
Copy
variables:
  # An Auth0 Organization loaded using its name.
  some-organization-by-name:
    fn::invoke:
      function: auth0:getOrganization
      arguments:
        name: my-org
  # An Auth0 Organization loaded using its ID.
  some-organization-by-id:
    fn::invoke:
      function: auth0:getOrganization
      arguments:
        organizationId: org_abcdefghkijklmnopqrstuvwxyz0123456789
Copy

Using getOrganization

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getOrganization(args: GetOrganizationArgs, opts?: InvokeOptions): Promise<GetOrganizationResult>
function getOrganizationOutput(args: GetOrganizationOutputArgs, opts?: InvokeOptions): Output<GetOrganizationResult>
Copy
def get_organization(name: Optional[str] = None,
                     organization_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetOrganizationResult
def get_organization_output(name: Optional[pulumi.Input[str]] = None,
                     organization_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationResult]
Copy
func LookupOrganization(ctx *Context, args *LookupOrganizationArgs, opts ...InvokeOption) (*LookupOrganizationResult, error)
func LookupOrganizationOutput(ctx *Context, args *LookupOrganizationOutputArgs, opts ...InvokeOption) LookupOrganizationResultOutput
Copy

> Note: This function is named LookupOrganization in the Go SDK.

public static class GetOrganization 
{
    public static Task<GetOrganizationResult> InvokeAsync(GetOrganizationArgs args, InvokeOptions? opts = null)
    public static Output<GetOrganizationResult> Invoke(GetOrganizationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
public static Output<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: auth0:index/getOrganization:getOrganization
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name string
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
OrganizationId string
The ID of the organization. If not provided, name must be set.
Name string
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
OrganizationId string
The ID of the organization. If not provided, name must be set.
name String
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organizationId String
The ID of the organization. If not provided, name must be set.
name string
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organizationId string
The ID of the organization. If not provided, name must be set.
name str
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organization_id str
The ID of the organization. If not provided, name must be set.
name String
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organizationId String
The ID of the organization. If not provided, name must be set.

getOrganization Result

The following output properties are available:

Brandings List<GetOrganizationBranding>
Defines how to style the login pages.
ClientGrants List<string>
Client Grant ID(s) that are associated to the organization.
Connections List<GetOrganizationConnection>
DisplayName string
Friendly name of this organization.
Id string
The provider-assigned unique ID for this managed resource.
Members List<string>
User ID(s) that are members of the organization.
Metadata Dictionary<string, string>
Metadata associated with the organization. Maximum of 10 metadata properties allowed.
Name string
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
OrganizationId string
The ID of the organization. If not provided, name must be set.
Brandings []GetOrganizationBranding
Defines how to style the login pages.
ClientGrants []string
Client Grant ID(s) that are associated to the organization.
Connections []GetOrganizationConnectionType
DisplayName string
Friendly name of this organization.
Id string
The provider-assigned unique ID for this managed resource.
Members []string
User ID(s) that are members of the organization.
Metadata map[string]string
Metadata associated with the organization. Maximum of 10 metadata properties allowed.
Name string
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
OrganizationId string
The ID of the organization. If not provided, name must be set.
brandings List<GetOrganizationBranding>
Defines how to style the login pages.
clientGrants List<String>
Client Grant ID(s) that are associated to the organization.
connections List<GetOrganizationConnection>
displayName String
Friendly name of this organization.
id String
The provider-assigned unique ID for this managed resource.
members List<String>
User ID(s) that are members of the organization.
metadata Map<String,String>
Metadata associated with the organization. Maximum of 10 metadata properties allowed.
name String
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organizationId String
The ID of the organization. If not provided, name must be set.
brandings GetOrganizationBranding[]
Defines how to style the login pages.
clientGrants string[]
Client Grant ID(s) that are associated to the organization.
connections GetOrganizationConnection[]
displayName string
Friendly name of this organization.
id string
The provider-assigned unique ID for this managed resource.
members string[]
User ID(s) that are members of the organization.
metadata {[key: string]: string}
Metadata associated with the organization. Maximum of 10 metadata properties allowed.
name string
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organizationId string
The ID of the organization. If not provided, name must be set.
brandings Sequence[GetOrganizationBranding]
Defines how to style the login pages.
client_grants Sequence[str]
Client Grant ID(s) that are associated to the organization.
connections Sequence[GetOrganizationConnection]
display_name str
Friendly name of this organization.
id str
The provider-assigned unique ID for this managed resource.
members Sequence[str]
User ID(s) that are members of the organization.
metadata Mapping[str, str]
Metadata associated with the organization. Maximum of 10 metadata properties allowed.
name str
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organization_id str
The ID of the organization. If not provided, name must be set.
brandings List<Property Map>
Defines how to style the login pages.
clientGrants List<String>
Client Grant ID(s) that are associated to the organization.
connections List<Property Map>
displayName String
Friendly name of this organization.
id String
The provider-assigned unique ID for this managed resource.
members List<String>
User ID(s) that are members of the organization.
metadata Map<String>
Metadata associated with the organization. Maximum of 10 metadata properties allowed.
name String
The name of the organization. If not provided, organization_id must be set. For performance, it is advised to use the organization_id as a lookup if possible.
organizationId String
The ID of the organization. If not provided, name must be set.

Supporting Types

GetOrganizationBranding

Colors This property is required. Dictionary<string, string>
Color scheme used to customize the login pages.
LogoUrl This property is required. string
URL of logo to display on login page.
Colors This property is required. map[string]string
Color scheme used to customize the login pages.
LogoUrl This property is required. string
URL of logo to display on login page.
colors This property is required. Map<String,String>
Color scheme used to customize the login pages.
logoUrl This property is required. String
URL of logo to display on login page.
colors This property is required. {[key: string]: string}
Color scheme used to customize the login pages.
logoUrl This property is required. string
URL of logo to display on login page.
colors This property is required. Mapping[str, str]
Color scheme used to customize the login pages.
logo_url This property is required. str
URL of logo to display on login page.
colors This property is required. Map<String>
Color scheme used to customize the login pages.
logoUrl This property is required. String
URL of logo to display on login page.

GetOrganizationConnection

AssignMembershipOnLogin This property is required. 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 This property is required. string
The ID of the enabled connection on the organization.
IsSignupEnabled This property is required. bool
Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
ShowAsButton This property is required. bool
Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
AssignMembershipOnLogin This property is required. 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 This property is required. string
The ID of the enabled connection on the organization.
IsSignupEnabled This property is required. bool
Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
ShowAsButton This property is required. bool
Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
assignMembershipOnLogin This property is required. 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 This property is required. String
The ID of the enabled connection on the organization.
isSignupEnabled This property is required. Boolean
Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
showAsButton This property is required. Boolean
Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
assignMembershipOnLogin This property is required. 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 This property is required. string
The ID of the enabled connection on the organization.
isSignupEnabled This property is required. boolean
Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
showAsButton This property is required. boolean
Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
assign_membership_on_login This property is required. 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.
connection_id This property is required. str
The ID of the enabled connection on the organization.
is_signup_enabled This property is required. bool
Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
show_as_button This property is required. bool
Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.
assignMembershipOnLogin This property is required. 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 This property is required. String
The ID of the enabled connection on the organization.
isSignupEnabled This property is required. Boolean
Determines whether organization sign-up should be enabled for this organization connection. Only applicable for database connections. Note: is_signup_enabled can only be true if assign_membership_on_login is true.
showAsButton This property is required. Boolean
Determines whether a connection should be displayed on this organization’s login prompt. Only applicable for enterprise connections.

Package Details

Repository
Auth0 pulumi/pulumi-auth0
License
Apache-2.0
Notes
This Pulumi package is based on the auth0 Terraform Provider.
Auth0 v3.17.1 published on Tuesday, Apr 15, 2025 by Pulumi