1. Packages
  2. Github Provider
  3. API Docs
  4. getOrganizationRoleUsers
GitHub v6.8.0 published on Thursday, Oct 23, 2025 by Pulumi

github.getOrganizationRoleUsers

Get Started
github logo
GitHub v6.8.0 published on Thursday, Oct 23, 2025 by Pulumi

    Lookup all users assigned to a custom organization role.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getOrganizationRoleUsers({
        roleId: 1234,
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_organization_role_users(role_id=1234)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetOrganizationRoleUsers(ctx, &github.GetOrganizationRoleUsersArgs{
    			RoleId: 1234,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Github.GetOrganizationRoleUsers.Invoke(new()
        {
            RoleId = 1234,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    import com.pulumi.github.inputs.GetOrganizationRoleUsersArgs;
    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) {
            final var example = GithubFunctions.getOrganizationRoleUsers(GetOrganizationRoleUsersArgs.builder()
                .roleId(1234)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: github:getOrganizationRoleUsers
          arguments:
            roleId: 1234
    

    Nested Schema for users

    Read-Only

    • user_id (Number) The ID of the user.
    • login (String) The login for the GitHub user account.

    Using getOrganizationRoleUsers

    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 getOrganizationRoleUsers(args: GetOrganizationRoleUsersArgs, opts?: InvokeOptions): Promise<GetOrganizationRoleUsersResult>
    function getOrganizationRoleUsersOutput(args: GetOrganizationRoleUsersOutputArgs, opts?: InvokeOptions): Output<GetOrganizationRoleUsersResult>
    def get_organization_role_users(role_id: Optional[int] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetOrganizationRoleUsersResult
    def get_organization_role_users_output(role_id: Optional[pulumi.Input[int]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationRoleUsersResult]
    func GetOrganizationRoleUsers(ctx *Context, args *GetOrganizationRoleUsersArgs, opts ...InvokeOption) (*GetOrganizationRoleUsersResult, error)
    func GetOrganizationRoleUsersOutput(ctx *Context, args *GetOrganizationRoleUsersOutputArgs, opts ...InvokeOption) GetOrganizationRoleUsersResultOutput

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

    public static class GetOrganizationRoleUsers 
    {
        public static Task<GetOrganizationRoleUsersResult> InvokeAsync(GetOrganizationRoleUsersArgs args, InvokeOptions? opts = null)
        public static Output<GetOrganizationRoleUsersResult> Invoke(GetOrganizationRoleUsersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOrganizationRoleUsersResult> getOrganizationRoleUsers(GetOrganizationRoleUsersArgs args, InvokeOptions options)
    public static Output<GetOrganizationRoleUsersResult> getOrganizationRoleUsers(GetOrganizationRoleUsersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: github:index/getOrganizationRoleUsers:getOrganizationRoleUsers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RoleId int
    The ID of the organization role.
    RoleId int
    The ID of the organization role.
    roleId Integer
    The ID of the organization role.
    roleId number
    The ID of the organization role.
    role_id int
    The ID of the organization role.
    roleId Number
    The ID of the organization role.

    getOrganizationRoleUsers Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId int
    The ID of the organization role.
    Users List<GetOrganizationRoleUsersUser>
    (Set of Object, see schema) Users assigned to the organization role.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId int
    The ID of the organization role.
    Users []GetOrganizationRoleUsersUser
    (Set of Object, see schema) Users assigned to the organization role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId Integer
    The ID of the organization role.
    users List<GetOrganizationRoleUsersUser>
    (Set of Object, see schema) Users assigned to the organization role.
    id string
    The provider-assigned unique ID for this managed resource.
    roleId number
    The ID of the organization role.
    users GetOrganizationRoleUsersUser[]
    (Set of Object, see schema) Users assigned to the organization role.
    id str
    The provider-assigned unique ID for this managed resource.
    role_id int
    The ID of the organization role.
    users Sequence[GetOrganizationRoleUsersUser]
    (Set of Object, see schema) Users assigned to the organization role.
    id String
    The provider-assigned unique ID for this managed resource.
    roleId Number
    The ID of the organization role.
    users List<Property Map>
    (Set of Object, see schema) Users assigned to the organization role.

    Supporting Types

    GetOrganizationRoleUsersUser

    Login string
    The login for the GitHub user account.
    UserId int
    The ID of the user.
    Login string
    The login for the GitHub user account.
    UserId int
    The ID of the user.
    login String
    The login for the GitHub user account.
    userId Integer
    The ID of the user.
    login string
    The login for the GitHub user account.
    userId number
    The ID of the user.
    login str
    The login for the GitHub user account.
    user_id int
    The ID of the user.
    login String
    The login for the GitHub user account.
    userId Number
    The ID of the user.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.8.0 published on Thursday, Oct 23, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate