1. Registry
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. getOrganizationRoleGroups
Viewing docs for Auth0 v3.51.0
published on Tuesday, Aug 18, 2026 by Pulumi
auth0 logo auth0 logo
Viewing docs for Auth0 v3.51.0
published on Tuesday, Aug 18, 2026 by Pulumi

    Data source to retrieve the groups assigned to a specific role within the context of an organization. For the members with a direct role assignment, use auth0.getOrganizationRoleMembers. (EA only)

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    // The groups assigned to an organization-level role.
    const myRoleGroups = auth0.getOrganizationRoleGroups({
        organizationId: "org_abcdefghkijklmn",
        roleId: "rol_abcdefghkijklmn",
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    # The groups assigned to an organization-level role.
    my_role_groups = auth0.get_organization_role_groups(organization_id="org_abcdefghkijklmn",
        role_id="rol_abcdefghkijklmn")
    
    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 {
    		// The groups assigned to an organization-level role.
    		_, err := auth0.GetOrganizationRoleGroups(ctx, &auth0.GetOrganizationRoleGroupsArgs{
    			OrganizationId: "org_abcdefghkijklmn",
    			RoleId:         "rol_abcdefghkijklmn",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        // The groups assigned to an organization-level role.
        var myRoleGroups = Auth0.GetOrganizationRoleGroups.Invoke(new()
        {
            OrganizationId = "org_abcdefghkijklmn",
            RoleId = "rol_abcdefghkijklmn",
        });
    
    });
    
    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.GetOrganizationRoleGroupsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // The groups assigned to an organization-level role.
            final var myRoleGroups = Auth0Functions.getOrganizationRoleGroups(GetOrganizationRoleGroupsArgs.builder()
                .organizationId("org_abcdefghkijklmn")
                .roleId("rol_abcdefghkijklmn")
                .build());
    
        }
    }
    
    variables:
      # The groups assigned to an organization-level role.
      myRoleGroups:
        fn::invoke:
          function: auth0:getOrganizationRoleGroups
          arguments:
            organizationId: org_abcdefghkijklmn
            roleId: rol_abcdefghkijklmn
    
    pulumi {
      required_providers {
        auth0 = {
          source = "pulumi/auth0"
        }
      }
    }
    
    data "auth0_getorganizationrolegroups" "myRoleGroups" {
      organization_id = "org_abcdefghkijklmn"
      role_id         = "rol_abcdefghkijklmn"
    }
    
    # The groups assigned to an organization-level role.
    

    Using getOrganizationRoleGroups

    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 getOrganizationRoleGroups(args: GetOrganizationRoleGroupsArgs, opts?: InvokeOptions): Promise<GetOrganizationRoleGroupsResult>
    function getOrganizationRoleGroupsOutput(args: GetOrganizationRoleGroupsOutputArgs, opts?: InvokeOutputOptions): Output<GetOrganizationRoleGroupsResult>
    def get_organization_role_groups(organization_id: Optional[str] = None,
                                     role_id: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetOrganizationRoleGroupsResult
    def get_organization_role_groups_output(organization_id: pulumi.Input[Optional[str]] = None,
                                     role_id: pulumi.Input[Optional[str]] = None,
                                     opts: Optional[InvokeOutputOptions] = None) -> Output[GetOrganizationRoleGroupsResult]
    func GetOrganizationRoleGroups(ctx *Context, args *GetOrganizationRoleGroupsArgs, opts ...InvokeOption) (*GetOrganizationRoleGroupsResult, error)
    func GetOrganizationRoleGroupsOutput(ctx *Context, args *GetOrganizationRoleGroupsOutputArgs, opts ...InvokeOption) GetOrganizationRoleGroupsResultOutput

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

    public static class GetOrganizationRoleGroups 
    {
        public static Task<GetOrganizationRoleGroupsResult> InvokeAsync(GetOrganizationRoleGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationRoleGroupsResult> Invoke(GetOrganizationRoleGroupsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationRoleGroupsResult> Invoke(GetOrganizationRoleGroupsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetOrganizationRoleGroupsResult> getOrganizationRoleGroups(GetOrganizationRoleGroupsArgs args, InvokeOptions options)
    public static Output<GetOrganizationRoleGroupsResult> getOrganizationRoleGroups(GetOrganizationRoleGroupsArgs args, InvokeOptions options)
    public static Output<GetOrganizationRoleGroupsResult> getOrganizationRoleGroups(GetOrganizationRoleGroupsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: auth0:index/getOrganizationRoleGroups:getOrganizationRoleGroups
      arguments:
        # arguments dictionary
    data "auth0_get_organization_role_groups" "name" {
        # arguments
    }

    The following arguments are supported:

    OrganizationId string
    The ID of the organization.
    RoleId string
    The ID of the role to retrieve the assigned groups for.
    OrganizationId string
    The ID of the organization.
    RoleId string
    The ID of the role to retrieve the assigned groups for.
    organization_id string
    The ID of the organization.
    role_id string
    The ID of the role to retrieve the assigned groups for.
    organizationId String
    The ID of the organization.
    roleId String
    The ID of the role to retrieve the assigned groups for.
    organizationId string
    The ID of the organization.
    roleId string
    The ID of the role to retrieve the assigned groups for.
    organization_id str
    The ID of the organization.
    role_id str
    The ID of the role to retrieve the assigned groups for.
    organizationId String
    The ID of the organization.
    roleId String
    The ID of the role to retrieve the assigned groups for.

    getOrganizationRoleGroups Result

    The following output properties are available:

    Groups List<GetOrganizationRoleGroupsGroup>
    The groups assigned to the role.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the organization.
    RoleId string
    The ID of the role to retrieve the assigned groups for.
    Groups []GetOrganizationRoleGroupsGroup
    The groups assigned to the role.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The ID of the organization.
    RoleId string
    The ID of the role to retrieve the assigned groups for.
    groups list(object)
    The groups assigned to the role.
    id string
    The provider-assigned unique ID for this managed resource.
    organization_id string
    The ID of the organization.
    role_id string
    The ID of the role to retrieve the assigned groups for.
    groups List<GetOrganizationRoleGroupsGroup>
    The groups assigned to the role.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the organization.
    roleId String
    The ID of the role to retrieve the assigned groups for.
    groups GetOrganizationRoleGroupsGroup[]
    The groups assigned to the role.
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The ID of the organization.
    roleId string
    The ID of the role to retrieve the assigned groups for.
    groups Sequence[GetOrganizationRoleGroupsGroup]
    The groups assigned to the role.
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The ID of the organization.
    role_id str
    The ID of the role to retrieve the assigned groups for.
    groups List<Property Map>
    The groups assigned to the role.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The ID of the organization.
    roleId String
    The ID of the role to retrieve the assigned groups for.

    Supporting Types

    GetOrganizationRoleGroupsGroup

    ConnectionId string
    The ID of the connection the group belongs to, if it is a connection group.
    CreatedAt string
    ISO 8601 timestamp when the group was created.
    Description string
    The description of the group.
    ExternalId string
    The external identifier of the group, often used for SCIM synchronization.
    Id string
    The unique identifier for the group.
    Name string
    The name of the group.
    OrganizationId string
    The ID of the organization the group belongs to, if it is an organization group.
    UpdatedAt string
    ISO 8601 timestamp when the group was last updated.
    ConnectionId string
    The ID of the connection the group belongs to, if it is a connection group.
    CreatedAt string
    ISO 8601 timestamp when the group was created.
    Description string
    The description of the group.
    ExternalId string
    The external identifier of the group, often used for SCIM synchronization.
    Id string
    The unique identifier for the group.
    Name string
    The name of the group.
    OrganizationId string
    The ID of the organization the group belongs to, if it is an organization group.
    UpdatedAt string
    ISO 8601 timestamp when the group was last updated.
    connection_id string
    The ID of the connection the group belongs to, if it is a connection group.
    created_at string
    ISO 8601 timestamp when the group was created.
    description string
    The description of the group.
    external_id string
    The external identifier of the group, often used for SCIM synchronization.
    id string
    The unique identifier for the group.
    name string
    The name of the group.
    organization_id string
    The ID of the organization the group belongs to, if it is an organization group.
    updated_at string
    ISO 8601 timestamp when the group was last updated.
    connectionId String
    The ID of the connection the group belongs to, if it is a connection group.
    createdAt String
    ISO 8601 timestamp when the group was created.
    description String
    The description of the group.
    externalId String
    The external identifier of the group, often used for SCIM synchronization.
    id String
    The unique identifier for the group.
    name String
    The name of the group.
    organizationId String
    The ID of the organization the group belongs to, if it is an organization group.
    updatedAt String
    ISO 8601 timestamp when the group was last updated.
    connectionId string
    The ID of the connection the group belongs to, if it is a connection group.
    createdAt string
    ISO 8601 timestamp when the group was created.
    description string
    The description of the group.
    externalId string
    The external identifier of the group, often used for SCIM synchronization.
    id string
    The unique identifier for the group.
    name string
    The name of the group.
    organizationId string
    The ID of the organization the group belongs to, if it is an organization group.
    updatedAt string
    ISO 8601 timestamp when the group was last updated.
    connection_id str
    The ID of the connection the group belongs to, if it is a connection group.
    created_at str
    ISO 8601 timestamp when the group was created.
    description str
    The description of the group.
    external_id str
    The external identifier of the group, often used for SCIM synchronization.
    id str
    The unique identifier for the group.
    name str
    The name of the group.
    organization_id str
    The ID of the organization the group belongs to, if it is an organization group.
    updated_at str
    ISO 8601 timestamp when the group was last updated.
    connectionId String
    The ID of the connection the group belongs to, if it is a connection group.
    createdAt String
    ISO 8601 timestamp when the group was created.
    description String
    The description of the group.
    externalId String
    The external identifier of the group, often used for SCIM synchronization.
    id String
    The unique identifier for the group.
    name String
    The name of the group.
    organizationId String
    The ID of the organization the group belongs to, if it is an organization group.
    updatedAt String
    ISO 8601 timestamp when the group was last updated.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo auth0 logo
    Viewing docs for Auth0 v3.51.0
    published on Tuesday, Aug 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial