GitHub v6.8.0 published on Thursday, Oct 23, 2025 by Pulumi
github.getOrganizationRoleUsers
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 dictionaryThe following arguments are supported:
- Role
Id int - The ID of the organization role.
- Role
Id int - The ID of the organization role.
- role
Id Integer - The ID of the organization role.
- role
Id number - The ID of the organization role.
- role_
id int - The ID of the organization role.
- role
Id 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.
- Role
Id int - The ID of the organization role.
- Users
List<Get
Organization Role Users User> - (Set of Object, see schema) Users assigned to the organization role.
- Id string
- The provider-assigned unique ID for this managed resource.
- Role
Id int - The ID of the organization role.
- Users
[]Get
Organization Role Users User - (Set of Object, see schema) Users assigned to the organization role.
- id String
- The provider-assigned unique ID for this managed resource.
- role
Id Integer - The ID of the organization role.
- users
List<Get
Organization Role Users User> - (Set of Object, see schema) Users assigned to the organization role.
- id string
- The provider-assigned unique ID for this managed resource.
- role
Id number - The ID of the organization role.
- users
Get
Organization Role Users User[] - (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[Get
Organization Role Users User] - (Set of Object, see schema) Users assigned to the organization role.
- id String
- The provider-assigned unique ID for this managed resource.
- role
Id 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
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
