Skip to main content

Solução de problemas de gerenciamento de identidade e acesso da empresa

Examine os problemas e as soluções comuns para o gerenciamento de identidade e acesso da empresa.

Exibir informações de identidade externa de um usuário

Se um usuário não conseguir se autenticar com êxito usando SAML, talvez seja útil exibir informações sobre a identidade de logon único vinculada à conta do usuário em GitHub. Para saber mais, confira Visualizar e gerenciar o acesso SAML de um usuário à sua empresa.

Conflitos de nome de usuário

Se a sua empresa usar os Enterprise Managed Users, o GitHub normalizará o valor do atributo userName do SCIM que é enviado por um IdP (provedor de identidade) em uma chamada à API do SCIM para criar o nome de usuário de cada pessoa no GitHub. Se várias contas forem normalizadas com o mesmo nome de usuário do GitHub, apenas a primeira conta de usuário será criada. Para saber mais, confira Considerações de nome de usuário para autenticação externa.

Erros ao alternar as configurações de autenticação

Se você estiver com problemas ao alternar entre diferentes configurações de autenticação, como alterar a configuração de SSO do SAML de uma organização para uma conta empresarial ou migrar do SAML para o OIDC com Enterprise Managed Users, verifique se as práticas recomendadas para a alteração estão sendo seguidas.

Como acessar a empresa quando o SSO não estiver disponível

Se um erro de configuração ou um problema com o IdP (provedor de identidade) impedir que você use o SSO, use um código de recuperação para acessar a empresa. Para saber mais, confira Acessando a conta corporativa se seu provedor de identidade estiver indisponível.

Erros de provisionamento SCIM

Para evitar exceder o limite de taxa do GitHub, não atribua mais de 1.000 usuários por hora à integração do SCIM no IdP. Se você usar grupos para atribuir usuários ao aplicativo do IdP, não adicione mais de mil usuários a cada grupo por hora. Se você exceder esses limites, as tentativas de provisionar usuários poderão falhar com um erro de "limite de taxa". Você pode examinar os logs do IdP para confirmar se houve falha no provisionamento do SCIM ou nas operações de push devido a um erro de limite de taxa. A resposta a uma tentativa de provisionamento com falha dependerá do IdP.

O Microsoft Entra ID (o antigo Azure AD) tentará novamente as tentativas de provisionamento SCIM automaticamente durante o próximo ciclo de sincronização do Entra ID. O intervalo de provisionamento SCIM padrão para o Entra ID é de 40 minutos. Para obter mais informações sobre esse comportamento de repetição, confira a documentação da Microsoft ou entre em contato com Suporte da Microsoft se precisar de assistência adicional.

O Okta tentará novamente os esforços de provisionamento SCIM com intervenção manual do administrador do Okta. Para obter mais informações sobre como um administrador do Okta pode tentar novamente uma tarefa com falha para um aplicativo específico, confira a documentação do Okta ou entre em contato com o suporte do Okta.

Em um empresa com usuários gerenciados em que o SCIM geralmente está funcionando corretamente, as tentativas de provisionamento do SCIM de usuários individuais às vezes falham. Os usuários não poderão entrar até que sua conta seja provisionada para o GitHub. Essas falhas individuais de provisionamento de usuário SCIM resultam em um código de status HTTP 400 e geralmente são causadas por problemas com a normalização de nome de usuário ou conflitos de nome de usuário, em que outro usuário com o mesmo nome de usuário normalizado já existe na empresa. Confira Considerações de nome de usuário para autenticação externa.

Erros de autenticação do SAML

Se os usuários estiverem recebendo erros ao tentar a autenticação com o SAML, confira Autenticação SAML.

Erros de identidades SAML conflitantes

When users attempt to authenticate with your SAML identity provider (IdP) to access a GitHub organization or enterprise for the first time, they may encounter the following error message.

Your GitHub user account [GitHub username] is currently unlinked. However, you are attempting to authenticate with your Identity Provider using [IdP user account] SAML identity which is already linked to a different GitHub user account in the [organization/enterprise]. Please reach out to one of your GitHub [organization/enterprise] owners for assistance.

If the IdP is Entra ID, the error message will include the User Object ID of the linked identity in Entra ID, which GitHub refers to as the External ID.

This error message occurs because an external identity can only be linked to a single GitHub user account within an organization or enterprise.

Identifying the user with a conflicting identity

When users contact you with this error, you can run through the following steps to identify the conflicting accounts.

  1. Use the GitHub GraphQL API to determine which user is linked to the conflicting external identity.
    • If SAML is configured at the GitHub organization level: an organization owner must query the existing external identities at the organization level and filter them by the SAML NameID of the IdP account that the user is authenticating with when this error occurs. See the org-saml-identities-filtered-by-nameid-username.graphql sample in the platform-samples repository.
    • If SAML is configured at the GitHub enterprise level: an enterprise owner must query the existing external identities at the enterprise level and filter them by the SAML NameID of the IdP account that the user is authenticating with when this error occurs. See the enterprise-saml-identities-filtered-by-nameid.graphql sample in the platform-samples repository.
  2. If you identified a GitHub user associated with the conflicting external identity, to confirm if the user is still active in the enterprise and any organizations within it, an enterprise owner can follow the steps in Visualizar pessoas na sua empresa.

Resolving the conflict

When you have followed the steps to identify conflicting accounts, there are various resolution options depending on your findings. If you encounter issues when attempting to follow these steps or have questions, you can open a GitHub support ticket using the Portal de Suporte do GitHub.

Conflicting GitHub user no longer needs access

If there is a GitHub user account associated with the conflicting external identity that no longer needs access to the GitHub organization or enterprise, remove them as a member. If the user is removed properly, this should also remove their linked SAML identity, and linked SCIM identity if this exists at the organization level.

  • If you use SCIM provisioning to manage organization membership, you must deprovision the user from your IdP via SCIM, rather than following the steps on GitHub. Otherwise, the user's linked SAML and SCIM identity will remain in the organization, which may continue to cause the error.
  • If don't use SCIM provisioning to manage organization membership, see Remover um integrante da organização or Removendo um integrante da sua empresa. Make sure to also remove the user's access from the GitHub app for the organization or enterprise in your IdP.

To confirm that a SAML or SCIM identity has been successfully removed from a GitHub organization for a user, see Solução de problemas de gerenciamento de identidade e acesso da organização.

Conflicting GitHub user still needs access

If there is a GitHub user account associated with the conflicting external identity and this user still needs access to the organization or enterprise, you will need to either change the linked identity for the user account or have the user who is receiving the error authenticate with a different IdP identity.

  • If you use SCIM provisioning to manage membership of an organization and you need to change the external identity that is linked to the member's GitHub account, deprovision then reprovision the user from your IdP (for example, unassign and reassign the user to the app).
    • When the IdP user is deprovisioned, their GitHub account and linked SAML/SCIM identity will be removed from the GitHub organization.
    • When the IdP user is reprovisioned to the GitHub organization, a new pending organization invitation and new unlinked SCIM identity will be created. This will allow the user to sign in with this GitHub user account, authenticate via SAML, and link the new IdP identity to their account. These steps will help ensure that both the new SAML and SCIM identity are properly linked to the GitHub user account in the organization.
  • If you don't use SCIM provisioning to manage organization membership, or if SAML is configured at the enterprise level, you can revoke the linked external identity for the user by following the steps in one of the following articles:

No conflicting GitHub user found

If there is no GitHub user account associated with the conflicting external identity, you can revoke the external identity.

  • If you use SCIM provisioning to manage membership of the organization, remove the stale, unlinked identity from your IdP (for example, unassign the user from the IdP app).
  • If you don't use SCIM provisioning to manage membership of the organization, to revoke the linked external identity, navigate to one of the following URLs below to revoke the external identity. Replace USERNAME with the GitHub username of the user who cannot sign in, and ORGANIZATION or ENTERPRISE with the appropriate value.
    • https://github.com/orgs/ORGANIZATION/people/USERNAME/sso
    • https://github.com/enterprises/ENTERPRISE/people/USERNAME/sso

Leitura adicional