GitHub v6.7.2 published on Wednesday, Apr 30, 2025 by Pulumi
github.getOrganization
Explore with Pulumi AI
Use this data source to retrieve basic information about a GitHub Organization.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getOrganization({
    name: "github",
});
import pulumi
import pulumi_github as github
example = github.get_organization(name="github")
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.GetOrganization(ctx, &github.GetOrganizationArgs{
			Name: "github",
		}, 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.GetOrganization.Invoke(new()
    {
        Name = "github",
    });
});
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.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) {
        final var example = GithubFunctions.getOrganization(GetOrganizationArgs.builder()
            .name("github")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: github:getOrganization
      arguments:
        name: github
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>def get_organization(ignore_archived_repos: Optional[bool] = None,
                     name: Optional[str] = None,
                     summary_only: Optional[bool] = None,
                     opts: Optional[InvokeOptions] = None) -> GetOrganizationResult
def get_organization_output(ignore_archived_repos: Optional[pulumi.Input[bool]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     summary_only: Optional[pulumi.Input[bool]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetOrganizationResult]func GetOrganization(ctx *Context, args *GetOrganizationArgs, opts ...InvokeOption) (*GetOrganizationResult, error)
func GetOrganizationOutput(ctx *Context, args *GetOrganizationOutputArgs, opts ...InvokeOption) GetOrganizationResultOutput> Note: This function is named GetOrganization 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)
}public static CompletableFuture<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
public static Output<GetOrganizationResult> getOrganization(GetOrganizationArgs args, InvokeOptions options)
fn::invoke:
  function: github:index/getOrganization:getOrganization
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the organization.
- IgnoreArchived boolRepos 
- Whether or not to include archived repos in the repositorieslist. Defaults tofalse.
- SummaryOnly bool
- Exclude the repos, members and other attributes from the returned result. Defaults to false.
- Name string
- The name of the organization.
- IgnoreArchived boolRepos 
- Whether or not to include archived repos in the repositorieslist. Defaults tofalse.
- SummaryOnly bool
- Exclude the repos, members and other attributes from the returned result. Defaults to false.
- name String
- The name of the organization.
- ignoreArchived BooleanRepos 
- Whether or not to include archived repos in the repositorieslist. Defaults tofalse.
- summaryOnly Boolean
- Exclude the repos, members and other attributes from the returned result. Defaults to false.
- name string
- The name of the organization.
- ignoreArchived booleanRepos 
- Whether or not to include archived repos in the repositorieslist. Defaults tofalse.
- summaryOnly boolean
- Exclude the repos, members and other attributes from the returned result. Defaults to false.
- name str
- The name of the organization.
- ignore_archived_ boolrepos 
- Whether or not to include archived repos in the repositorieslist. Defaults tofalse.
- summary_only bool
- Exclude the repos, members and other attributes from the returned result. Defaults to false.
- name String
- The name of the organization.
- ignoreArchived BooleanRepos 
- Whether or not to include archived repos in the repositorieslist. Defaults tofalse.
- summaryOnly Boolean
- Exclude the repos, members and other attributes from the returned result. Defaults to false.
getOrganization Result
The following output properties are available:
- AdvancedSecurity boolEnabled For New Repositories 
- Whether advanced security is enabled for new repositories.
- DefaultRepository stringPermission 
- Default permission level members have for organization repositories.
- DependabotAlerts boolEnabled For New Repositories 
- Whether Dependabot alerts is automatically enabled for new repositories.
- DependabotSecurity boolUpdates Enabled For New Repositories 
- Whether Dependabot security updates is automatically enabled for new repositories.
- DependencyGraph boolEnabled For New Repositories 
- Whether dependency graph is automatically enabled for new repositories.
- Description string
- The organization account description
- Id string
- The provider-assigned unique ID for this managed resource.
- Login string
- The members login
- Members List<string>
- Deprecated: use usersinstead by replacinggithub_organization.example.memberstogithub_organization.example.users[*].loginwhich will give you the same value, expect this field to be removed in next major version
- MembersAllowed stringRepository Creation Type 
- The type of repository allowed to be created by members of the organization. Can be one of ALL,PUBLIC,PRIVATE,NONE.
- MembersCan boolCreate Internal Repositories 
- Whether organization members can create internal repositories.
- MembersCan boolCreate Pages 
- Whether organization members can create pages sites.
- MembersCan boolCreate Private Pages 
- Whether organization members can create private pages sites.
- MembersCan boolCreate Private Repositories 
- Whether organization members can create private repositories.
- MembersCan boolCreate Public Pages 
- Whether organization members can create public pages sites.
- MembersCan boolCreate Public Repositories 
- Whether organization members can create public repositories.
- MembersCan boolCreate Repositories 
- Whether non-admin organization members can create repositories.
- MembersCan boolFork Private Repositories 
- Whether organization members can create private repository forks.
- Name string
- The organization's public profile name
- NodeId string
- GraphQL global node ID for use with the v4 API
- Orgname string
- The organization's name as used in URLs and the API
- Plan string
- The organization account plan name
- Repositories List<string>
- (list) A list of the full names of the repositories in the organization formatted asowner/namestrings
- SecretScanning boolEnabled For New Repositories 
- Whether secret scanning is automatically enabled for new repositories.
- SecretScanning boolPush Protection Enabled For New Repositories 
- Whether secret scanning push protection is automatically enabled for new repositories.
- TwoFactor boolRequirement Enabled 
- Whether two-factor authentication is required for all members of the organization.
- Users
List<ImmutableDictionary<string, string>> 
- (list) A list with the members of the organization with following fields:
- WebCommit boolSignoff Required 
- Whether organization members must sign all commits.
- IgnoreArchived boolRepos 
- SummaryOnly bool
- AdvancedSecurity boolEnabled For New Repositories 
- Whether advanced security is enabled for new repositories.
- DefaultRepository stringPermission 
- Default permission level members have for organization repositories.
- DependabotAlerts boolEnabled For New Repositories 
- Whether Dependabot alerts is automatically enabled for new repositories.
- DependabotSecurity boolUpdates Enabled For New Repositories 
- Whether Dependabot security updates is automatically enabled for new repositories.
- DependencyGraph boolEnabled For New Repositories 
- Whether dependency graph is automatically enabled for new repositories.
- Description string
- The organization account description
- Id string
- The provider-assigned unique ID for this managed resource.
- Login string
- The members login
- Members []string
- Deprecated: use usersinstead by replacinggithub_organization.example.memberstogithub_organization.example.users[*].loginwhich will give you the same value, expect this field to be removed in next major version
- MembersAllowed stringRepository Creation Type 
- The type of repository allowed to be created by members of the organization. Can be one of ALL,PUBLIC,PRIVATE,NONE.
- MembersCan boolCreate Internal Repositories 
- Whether organization members can create internal repositories.
- MembersCan boolCreate Pages 
- Whether organization members can create pages sites.
- MembersCan boolCreate Private Pages 
- Whether organization members can create private pages sites.
- MembersCan boolCreate Private Repositories 
- Whether organization members can create private repositories.
- MembersCan boolCreate Public Pages 
- Whether organization members can create public pages sites.
- MembersCan boolCreate Public Repositories 
- Whether organization members can create public repositories.
- MembersCan boolCreate Repositories 
- Whether non-admin organization members can create repositories.
- MembersCan boolFork Private Repositories 
- Whether organization members can create private repository forks.
- Name string
- The organization's public profile name
- NodeId string
- GraphQL global node ID for use with the v4 API
- Orgname string
- The organization's name as used in URLs and the API
- Plan string
- The organization account plan name
- Repositories []string
- (list) A list of the full names of the repositories in the organization formatted asowner/namestrings
- SecretScanning boolEnabled For New Repositories 
- Whether secret scanning is automatically enabled for new repositories.
- SecretScanning boolPush Protection Enabled For New Repositories 
- Whether secret scanning push protection is automatically enabled for new repositories.
- TwoFactor boolRequirement Enabled 
- Whether two-factor authentication is required for all members of the organization.
- Users []map[string]string
- (list) A list with the members of the organization with following fields:
- WebCommit boolSignoff Required 
- Whether organization members must sign all commits.
- IgnoreArchived boolRepos 
- SummaryOnly bool
- advancedSecurity BooleanEnabled For New Repositories 
- Whether advanced security is enabled for new repositories.
- defaultRepository StringPermission 
- Default permission level members have for organization repositories.
- dependabotAlerts BooleanEnabled For New Repositories 
- Whether Dependabot alerts is automatically enabled for new repositories.
- dependabotSecurity BooleanUpdates Enabled For New Repositories 
- Whether Dependabot security updates is automatically enabled for new repositories.
- dependencyGraph BooleanEnabled For New Repositories 
- Whether dependency graph is automatically enabled for new repositories.
- description String
- The organization account description
- id String
- The provider-assigned unique ID for this managed resource.
- login String
- The members login
- members List<String>
- Deprecated: use usersinstead by replacinggithub_organization.example.memberstogithub_organization.example.users[*].loginwhich will give you the same value, expect this field to be removed in next major version
- membersAllowed StringRepository Creation Type 
- The type of repository allowed to be created by members of the organization. Can be one of ALL,PUBLIC,PRIVATE,NONE.
- membersCan BooleanCreate Internal Repositories 
- Whether organization members can create internal repositories.
- membersCan BooleanCreate Pages 
- Whether organization members can create pages sites.
- membersCan BooleanCreate Private Pages 
- Whether organization members can create private pages sites.
- membersCan BooleanCreate Private Repositories 
- Whether organization members can create private repositories.
- membersCan BooleanCreate Public Pages 
- Whether organization members can create public pages sites.
- membersCan BooleanCreate Public Repositories 
- Whether organization members can create public repositories.
- membersCan BooleanCreate Repositories 
- Whether non-admin organization members can create repositories.
- membersCan BooleanFork Private Repositories 
- Whether organization members can create private repository forks.
- name String
- The organization's public profile name
- nodeId String
- GraphQL global node ID for use with the v4 API
- orgname String
- The organization's name as used in URLs and the API
- plan String
- The organization account plan name
- repositories List<String>
- (list) A list of the full names of the repositories in the organization formatted asowner/namestrings
- secretScanning BooleanEnabled For New Repositories 
- Whether secret scanning is automatically enabled for new repositories.
- secretScanning BooleanPush Protection Enabled For New Repositories 
- Whether secret scanning push protection is automatically enabled for new repositories.
- twoFactor BooleanRequirement Enabled 
- Whether two-factor authentication is required for all members of the organization.
- users List<Map<String,String>>
- (list) A list with the members of the organization with following fields:
- webCommit BooleanSignoff Required 
- Whether organization members must sign all commits.
- ignoreArchived BooleanRepos 
- summaryOnly Boolean
- advancedSecurity booleanEnabled For New Repositories 
- Whether advanced security is enabled for new repositories.
- defaultRepository stringPermission 
- Default permission level members have for organization repositories.
- dependabotAlerts booleanEnabled For New Repositories 
- Whether Dependabot alerts is automatically enabled for new repositories.
- dependabotSecurity booleanUpdates Enabled For New Repositories 
- Whether Dependabot security updates is automatically enabled for new repositories.
- dependencyGraph booleanEnabled For New Repositories 
- Whether dependency graph is automatically enabled for new repositories.
- description string
- The organization account description
- id string
- The provider-assigned unique ID for this managed resource.
- login string
- The members login
- members string[]
- Deprecated: use usersinstead by replacinggithub_organization.example.memberstogithub_organization.example.users[*].loginwhich will give you the same value, expect this field to be removed in next major version
- membersAllowed stringRepository Creation Type 
- The type of repository allowed to be created by members of the organization. Can be one of ALL,PUBLIC,PRIVATE,NONE.
- membersCan booleanCreate Internal Repositories 
- Whether organization members can create internal repositories.
- membersCan booleanCreate Pages 
- Whether organization members can create pages sites.
- membersCan booleanCreate Private Pages 
- Whether organization members can create private pages sites.
- membersCan booleanCreate Private Repositories 
- Whether organization members can create private repositories.
- membersCan booleanCreate Public Pages 
- Whether organization members can create public pages sites.
- membersCan booleanCreate Public Repositories 
- Whether organization members can create public repositories.
- membersCan booleanCreate Repositories 
- Whether non-admin organization members can create repositories.
- membersCan booleanFork Private Repositories 
- Whether organization members can create private repository forks.
- name string
- The organization's public profile name
- nodeId string
- GraphQL global node ID for use with the v4 API
- orgname string
- The organization's name as used in URLs and the API
- plan string
- The organization account plan name
- repositories string[]
- (list) A list of the full names of the repositories in the organization formatted asowner/namestrings
- secretScanning booleanEnabled For New Repositories 
- Whether secret scanning is automatically enabled for new repositories.
- secretScanning booleanPush Protection Enabled For New Repositories 
- Whether secret scanning push protection is automatically enabled for new repositories.
- twoFactor booleanRequirement Enabled 
- Whether two-factor authentication is required for all members of the organization.
- users {[key: string]: string}[]
- (list) A list with the members of the organization with following fields:
- webCommit booleanSignoff Required 
- Whether organization members must sign all commits.
- ignoreArchived booleanRepos 
- summaryOnly boolean
- advanced_security_ boolenabled_ for_ new_ repositories 
- Whether advanced security is enabled for new repositories.
- default_repository_ strpermission 
- Default permission level members have for organization repositories.
- dependabot_alerts_ boolenabled_ for_ new_ repositories 
- Whether Dependabot alerts is automatically enabled for new repositories.
- dependabot_security_ boolupdates_ enabled_ for_ new_ repositories 
- Whether Dependabot security updates is automatically enabled for new repositories.
- dependency_graph_ boolenabled_ for_ new_ repositories 
- Whether dependency graph is automatically enabled for new repositories.
- description str
- The organization account description
- id str
- The provider-assigned unique ID for this managed resource.
- login str
- The members login
- members Sequence[str]
- Deprecated: use usersinstead by replacinggithub_organization.example.memberstogithub_organization.example.users[*].loginwhich will give you the same value, expect this field to be removed in next major version
- members_allowed_ strrepository_ creation_ type 
- The type of repository allowed to be created by members of the organization. Can be one of ALL,PUBLIC,PRIVATE,NONE.
- members_can_ boolcreate_ internal_ repositories 
- Whether organization members can create internal repositories.
- members_can_ boolcreate_ pages 
- Whether organization members can create pages sites.
- members_can_ boolcreate_ private_ pages 
- Whether organization members can create private pages sites.
- members_can_ boolcreate_ private_ repositories 
- Whether organization members can create private repositories.
- members_can_ boolcreate_ public_ pages 
- Whether organization members can create public pages sites.
- members_can_ boolcreate_ public_ repositories 
- Whether organization members can create public repositories.
- members_can_ boolcreate_ repositories 
- Whether non-admin organization members can create repositories.
- members_can_ boolfork_ private_ repositories 
- Whether organization members can create private repository forks.
- name str
- The organization's public profile name
- node_id str
- GraphQL global node ID for use with the v4 API
- orgname str
- The organization's name as used in URLs and the API
- plan str
- The organization account plan name
- repositories Sequence[str]
- (list) A list of the full names of the repositories in the organization formatted asowner/namestrings
- secret_scanning_ boolenabled_ for_ new_ repositories 
- Whether secret scanning is automatically enabled for new repositories.
- secret_scanning_ boolpush_ protection_ enabled_ for_ new_ repositories 
- Whether secret scanning push protection is automatically enabled for new repositories.
- two_factor_ boolrequirement_ enabled 
- Whether two-factor authentication is required for all members of the organization.
- users Sequence[Mapping[str, str]]
- (list) A list with the members of the organization with following fields:
- web_commit_ boolsignoff_ required 
- Whether organization members must sign all commits.
- ignore_archived_ boolrepos 
- summary_only bool
- advancedSecurity BooleanEnabled For New Repositories 
- Whether advanced security is enabled for new repositories.
- defaultRepository StringPermission 
- Default permission level members have for organization repositories.
- dependabotAlerts BooleanEnabled For New Repositories 
- Whether Dependabot alerts is automatically enabled for new repositories.
- dependabotSecurity BooleanUpdates Enabled For New Repositories 
- Whether Dependabot security updates is automatically enabled for new repositories.
- dependencyGraph BooleanEnabled For New Repositories 
- Whether dependency graph is automatically enabled for new repositories.
- description String
- The organization account description
- id String
- The provider-assigned unique ID for this managed resource.
- login String
- The members login
- members List<String>
- Deprecated: use usersinstead by replacinggithub_organization.example.memberstogithub_organization.example.users[*].loginwhich will give you the same value, expect this field to be removed in next major version
- membersAllowed StringRepository Creation Type 
- The type of repository allowed to be created by members of the organization. Can be one of ALL,PUBLIC,PRIVATE,NONE.
- membersCan BooleanCreate Internal Repositories 
- Whether organization members can create internal repositories.
- membersCan BooleanCreate Pages 
- Whether organization members can create pages sites.
- membersCan BooleanCreate Private Pages 
- Whether organization members can create private pages sites.
- membersCan BooleanCreate Private Repositories 
- Whether organization members can create private repositories.
- membersCan BooleanCreate Public Pages 
- Whether organization members can create public pages sites.
- membersCan BooleanCreate Public Repositories 
- Whether organization members can create public repositories.
- membersCan BooleanCreate Repositories 
- Whether non-admin organization members can create repositories.
- membersCan BooleanFork Private Repositories 
- Whether organization members can create private repository forks.
- name String
- The organization's public profile name
- nodeId String
- GraphQL global node ID for use with the v4 API
- orgname String
- The organization's name as used in URLs and the API
- plan String
- The organization account plan name
- repositories List<String>
- (list) A list of the full names of the repositories in the organization formatted asowner/namestrings
- secretScanning BooleanEnabled For New Repositories 
- Whether secret scanning is automatically enabled for new repositories.
- secretScanning BooleanPush Protection Enabled For New Repositories 
- Whether secret scanning push protection is automatically enabled for new repositories.
- twoFactor BooleanRequirement Enabled 
- Whether two-factor authentication is required for all members of the organization.
- users List<Map<String>>
- (list) A list with the members of the organization with following fields:
- webCommit BooleanSignoff Required 
- Whether organization members must sign all commits.
- ignoreArchived BooleanRepos 
- summaryOnly Boolean
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the githubTerraform Provider.