Skip to main content

Requiring two-factor authentication for an organization

You can require organization members and outside collaborators to enable two-factor authentication for their personal accounts in an organization, making it harder for malicious actors to access an organization's repositories and settings.

When using LDAP or built-in authentication, two-factor authentication is supported on your GitHub Enterprise Server instance. Organization administrators can require members to have two-factor authentication enabled.

Quando usar SAML ou CAS, a autenticação de dois fatores não é suportada ou gerenciada no appliance do GitHub Enterprise Server, mas pode ser suportada pelo provedor de autenticação externa. A aplicação da autenticação de dois fatores em organizações não está disponível. Para obter mais informações sobre como aplicar a autenticação de dois fatores nas organizações, confira "Exigir a autenticação de dois fatores em sua organização".

For more information, see "About two-factor authentication."

Requirements for enforcing two-factor authentication

Before you can require organization members and outside collaborators to use 2FA, you must enable two-factor authentication for your own personal account.

Warnings:

  • When your require two-factor authentication, members and outside collaborators (including bot accounts) who do not use 2FA will be removed from the organization and lose access to its repositories, including their forks of private repositories. If they enable 2FA for their personal account within three months of being removed from the organization, you can reinstate their access privileges and settings.
  • When 2FA is required, organization members or outside collaborators who disable 2FA will automatically be removed from the organization.
  • If you're the sole owner of an organization that requires two-factor authentication, you won't be able to disable 2FA for your personal account without disabling required two-factor authentication for the organization.

Before you require use of two-factor authentication, we recommend notifying organization members and outside collaborators and asking them to set up 2FA for their accounts. You can see if members and outside collaborators already use 2FA on an organization's People tab.

  1. No canto superior direito do GitHub Enterprise Server, clique na foto do seu perfil e clique em Suas organizações. Suas organizações no menu de perfil

  2. Ao lado da organização, clique em Configurações. Botão de configurações

  3. In the "Security" section of the sidebar, click Authentication security.

  4. Em "Autenticação", selecione Exigir autenticação de dois fatores para todos em sua organização e clique em Salvar. Requer a caixa de seleção 2FA

  5. Se solicitado, leia as informações sobre membros e colaboradores externos que serão removidos da organização. Digite o nome da sua organização para confirmar a alteração e clique em Remover membros e exigir a autenticação de dois fatores. Caixa Confirmar a imposição de dois fatores

Viewing people who were removed from your organization

To view people who were automatically removed from your organization for non-compliance when you required two-factor authentication, you can search the audit log using reason:two_factor_requirement_non_compliance in the search field.

  1. No canto superior esquerdo de qualquer página, clique em . Ícone do Octocat

  2. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

    Captura de tela do ícone de foguete para acesso às configurações de administração do site

  3. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

    Captura de tela do link "Administração do site"

  4. In the "Archives" section of the sidebar, click Security log.

  5. Enter your search query using reason:two_factor_requirement_non_compliance. Staff tools audit log event showing a user removed for 2FA non-compliance To narrow your search for:

    • Organizations members removed, enter action:org.remove_member AND reason:two_factor_requirement_non_compliance

    • Outside collaborators removed, enter action:org.remove_outside_collaborator AND reason:two_factor_requirement_non_compliance

      You can also view people removed from a particular organization by using the organization name in your search:

    • org:octo-org AND reason:two_factor_requirement_non_compliance

  6. Click Search.

Helping removed members and outside collaborators rejoin your organization

If any members or outside collaborators are removed from the organization when you enable required use of two-factor authentication, they'll receive an email notifying them that they've been removed. They should then enable 2FA for their personal account, and contact an organization owner to request access to your organization.

Further reading