1. Registry
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. getOrganizationRoleMembers
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 organization members assigned a specific role within the context of an organization. Only members with a direct role assignment are returned; for the groups assigned to the role, use auth0.getOrganizationRoleGroups. (EA only)

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    // The organization members with a direct assignment of an organization-level role.
    const myRoleMembers = auth0.getOrganizationRoleMembers({
        organizationId: "org_abcdefghkijklmn",
        roleId: "rol_abcdefghkijklmn",
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    # The organization members with a direct assignment of an organization-level role.
    my_role_members = auth0.get_organization_role_members(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 organization members with a direct assignment of an organization-level role.
    		_, err := auth0.GetOrganizationRoleMembers(ctx, &auth0.GetOrganizationRoleMembersArgs{
    			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 organization members with a direct assignment of an organization-level role.
        var myRoleMembers = Auth0.GetOrganizationRoleMembers.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.GetOrganizationRoleMembersArgs;
    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 organization members with a direct assignment of an organization-level role.
            final var myRoleMembers = Auth0Functions.getOrganizationRoleMembers(GetOrganizationRoleMembersArgs.builder()
                .organizationId("org_abcdefghkijklmn")
                .roleId("rol_abcdefghkijklmn")
                .build());
    
        }
    }
    
    variables:
      # The organization members with a direct assignment of an organization-level role.
      myRoleMembers:
        fn::invoke:
          function: auth0:getOrganizationRoleMembers
          arguments:
            organizationId: org_abcdefghkijklmn
            roleId: rol_abcdefghkijklmn
    
    pulumi {
      required_providers {
        auth0 = {
          source = "pulumi/auth0"
        }
      }
    }
    
    data "auth0_getorganizationrolemembers" "myRoleMembers" {
      organization_id = "org_abcdefghkijklmn"
      role_id         = "rol_abcdefghkijklmn"
    }
    
    # The organization members with a direct assignment of an organization-level role.
    

    Using getOrganizationRoleMembers

    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 getOrganizationRoleMembers(args: GetOrganizationRoleMembersArgs, opts?: InvokeOptions): Promise<GetOrganizationRoleMembersResult>
    function getOrganizationRoleMembersOutput(args: GetOrganizationRoleMembersOutputArgs, opts?: InvokeOutputOptions): Output<GetOrganizationRoleMembersResult>
    def get_organization_role_members(organization_id: Optional[str] = None,
                                      role_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetOrganizationRoleMembersResult
    def get_organization_role_members_output(organization_id: pulumi.Input[Optional[str]] = None,
                                      role_id: pulumi.Input[Optional[str]] = None,
                                      opts: Optional[InvokeOutputOptions] = None) -> Output[GetOrganizationRoleMembersResult]
    func GetOrganizationRoleMembers(ctx *Context, args *GetOrganizationRoleMembersArgs, opts ...InvokeOption) (*GetOrganizationRoleMembersResult, error)
    func GetOrganizationRoleMembersOutput(ctx *Context, args *GetOrganizationRoleMembersOutputArgs, opts ...InvokeOption) GetOrganizationRoleMembersResultOutput

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

    public static class GetOrganizationRoleMembers 
    {
        public static Task<GetOrganizationRoleMembersResult> InvokeAsync(GetOrganizationRoleMembersArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationRoleMembersResult> Invoke(GetOrganizationRoleMembersInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationRoleMembersResult> Invoke(GetOrganizationRoleMembersInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetOrganizationRoleMembersResult> getOrganizationRoleMembers(GetOrganizationRoleMembersArgs args, InvokeOptions options)
    public static Output<GetOrganizationRoleMembersResult> getOrganizationRoleMembers(GetOrganizationRoleMembersArgs args, InvokeOptions options)
    public static Output<GetOrganizationRoleMembersResult> getOrganizationRoleMembers(GetOrganizationRoleMembersArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: auth0:index/getOrganizationRoleMembers:getOrganizationRoleMembers
      arguments:
        # arguments dictionary
    data "auth0_get_organization_role_members" "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 members for.
    OrganizationId string
    The ID of the organization.
    RoleId string
    The ID of the role to retrieve the assigned members for.
    organization_id string
    The ID of the organization.
    role_id string
    The ID of the role to retrieve the assigned members for.
    organizationId String
    The ID of the organization.
    roleId String
    The ID of the role to retrieve the assigned members for.
    organizationId string
    The ID of the organization.
    roleId string
    The ID of the role to retrieve the assigned members for.
    organization_id str
    The ID of the organization.
    role_id str
    The ID of the role to retrieve the assigned members for.
    organizationId String
    The ID of the organization.
    roleId String
    The ID of the role to retrieve the assigned members for.

    getOrganizationRoleMembers Result

    The following output properties are available:

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

    Supporting Types

    GetOrganizationRoleMembersMember

    Email string
    The email address of the user.
    Name string
    The name of the user.
    Picture string
    The URL to a picture for the user.
    UserId string
    The ID of the user.
    Email string
    The email address of the user.
    Name string
    The name of the user.
    Picture string
    The URL to a picture for the user.
    UserId string
    The ID of the user.
    email string
    The email address of the user.
    name string
    The name of the user.
    picture string
    The URL to a picture for the user.
    user_id string
    The ID of the user.
    email String
    The email address of the user.
    name String
    The name of the user.
    picture String
    The URL to a picture for the user.
    userId String
    The ID of the user.
    email string
    The email address of the user.
    name string
    The name of the user.
    picture string
    The URL to a picture for the user.
    userId string
    The ID of the user.
    email str
    The email address of the user.
    name str
    The name of the user.
    picture str
    The URL to a picture for the user.
    user_id str
    The ID of the user.
    email String
    The email address of the user.
    name String
    The name of the user.
    picture String
    The URL to a picture for the user.
    userId String
    The ID of the user.

    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