title | shortTitle | intro | permissions | versions | type | topics | redirect_from | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Configuring SAML single sign-on for your enterprise |
Configure SAML SSO |
You can control and secure access to {% ifversion ghec %}resources like repositories, issues, and pull requests within your enterprise's organizations{% elsif ghes %}{% data variables.location.product_location %}{% endif %} by {% ifversion ghec %}enforcing{% elsif ghes %}configuring{% endif %} SAML single sign-on (SSO) through your identity provider (IdP). |
{% ifversion ghes %}Site administrators{% elsif ghec %}Enterprise owners{% endif %} can configure SAML SSO for {% ifversion ghec %}an enterprise on {% data variables.product.github %}{% elsif ghes %}a {% data variables.product.prodname_ghe_server %} instance{% endif %}. |
|
how_to |
|
|
{% ifversion ghec %}
Before following the steps in this article, make sure that your enterprise uses personal accounts. You can do so by checking whether your enterprise view has the "Users managed by ACCOUNT NAME" header bar at the top of the screen.
If you see this, your enterprise uses managed users and you must follow a different process to configure SAML single sign-on. See AUTOTITLE.
{% endif %}
{% ifversion ghec %}
{% data reusables.saml.dotcom-saml-explanation %}
{% data reusables.saml.saml-accounts %}
For more information, see AUTOTITLE.
{% data reusables.saml.about-saml-enterprise-accounts %}
{% data reusables.saml.about-saml-access-enterprise-account %} For more information, see AUTOTITLE.
{% data reusables.saml.no-scim-for-enterprises %}
{% data reusables.saml.saml-disabled-linked-identities-removed %}
{% data reusables.apps.reauthorize-apps-saml %}
{% elsif ghes %}
SAML SSO allows you to centrally control and secure access to {% data variables.location.product_location %} from your SAML IdP. When an unauthenticated user visits {% data variables.location.product_location %} in a browser, {% data variables.product.github %} will redirect the user to your SAML IdP to authenticate. After the user successfully authenticates with an account on the IdP, the IdP redirects the user back to {% data variables.location.product_location %}. {% data variables.product.github %} validates the response from your IdP, then grants access to the user.
After a user successfully authenticates on your IdP, the user's SAML session for {% data variables.location.product_location %} is active in the browser for 24 hours. After 24 hours, the user must authenticate again with your IdP.
{% data reusables.saml.saml-ghes-account-revocation %}
{% endif %}
{% data reusables.saml.saml-supported-idps %}
{% ifversion ghec %}
For more information about connecting Microsoft Entra ID (previously known as Azure AD) to your enterprise, see Tutorial: Microsoft Entra SSO integration with GitHub Enterprise Cloud - Enterprise Account in Microsoft Docs.
{% elsif ghes %}
For more information about connecting Entra ID to your enterprise, see Tutorial: Microsoft Entra SSO integration with GitHub Enterprise Server in Microsoft Docs.
{% data reusables.enterprise_user_management.consider-usernames-for-external-authentication %} For more information, see AUTOTITLE.
{% endif %}
{% ifversion ghec %}
When you enforce SAML SSO for your enterprise, the enterprise configuration will override any existing organization-level SAML configurations. {% data reusables.saml.switching-from-org-to-enterprise %} For more information, see AUTOTITLE.
When you enforce SAML SSO for an organization, {% data variables.product.company_short %} removes any members of the organization that have not authenticated successfully with your SAML IdP. When you require SAML SSO for your enterprise, {% data variables.product.company_short %} does not remove members of the enterprise that have not authenticated successfully with your SAML IdP. The next time a member accesses the enterprise's resources, the member must authenticate with your SAML IdP.
For more detailed information about how to enable SAML using Okta, see AUTOTITLE.
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
-
{% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
-
Under "SAML single sign-on", select Require SAML authentication.
-
In the Sign on URL field, type the HTTPS endpoint of your IdP for single sign-on requests. This value is available in your IdP configuration.
-
Optionally, in the Issuer field, type your SAML issuer URL to verify the authenticity of sent messages.
-
Under Public Certificate, paste a certificate to verify SAML responses. This is the public key corresponding to the private key used to sign SAML responses.
To find the certificate, refer to the documentation for your IdP. Some IdPs call this an X.509 certificate.
{% data reusables.saml.edit-signature-and-digest-methods %}
- Before enabling SAML SSO for your enterprise, to ensure that the information you've entered is correct, click Test SAML configuration . {% data reusables.saml.test-must-succeed %}
- Click Save. {% data reusables.enterprise-accounts.download-recovery-codes %}
{% elsif ghes %}
You can enable or disable SAML authentication for {% data variables.location.product_location %}, or you can edit an existing configuration. You can view and edit authentication settings in the {% data variables.enterprise.management_console %}. For more information, see AUTOTITLE.
Note
{% data reusables.enterprise.test-in-staging %}
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.authentication %}
-
Under "Authentication", select SAML.
-
{% data reusables.enterprise_user_management.built-in-authentication-option %}
-
Optionally, to enable unsolicited response SSO, select IdP initiated SSO. By default, {% data variables.product.prodname_ghe_server %} will reply to an unsolicited Identity Provider (IdP) initiated request with an
AuthnRequest
back to the IdP.[!TIP] We recommend keeping this value unselected. You should enable this feature only in the rare instance that your SAML implementation does not support service provider initiated SSO, and when advised by {% data variables.contact.enterprise_support %}.
-
Optionally, if you do not want your SAML provider to determine administrator rights for users on {% data variables.location.product_location %}, select Disable administrator demotion/promotion {%- ifversion ghes %}
-
Optionally, to allow {% data variables.location.product_location %} to receive encrypted assertions from your SAML IdP, select Require encrypted assertions.
You must ensure that your IdP supports encrypted assertions and that the encryption and key transport methods in the management console match the values configured on your IdP. You must also provide {% data variables.location.product_location %}'s public certificate to your IdP. For more information, see AUTOTITLE. {%- endif %}
-
Under "Single sign-on URL," type the HTTP or HTTPS endpoint on your IdP for single sign-on requests. This value is provided by your IdP configuration. If the host is only available from your internal network, you may need to configure {% data variables.location.product_location %} to use internal nameservers.
-
Optionally, in the Issuer field, type your SAML issuer's name. This verifies the authenticity of messages sent to {% data variables.location.product_location %}.
-
Select the Signature Method and Digest Method dropdown menus, then click the hashing algorithm used by your SAML issuer to verify the integrity of the requests from {% data variables.location.product_location %}.
-
Select the Name Identifier Format dropdown menu, then click a format.
-
Under "Verification certificate," click Choose File, then choose a certificate to validate SAML responses from the IdP.
-
Under "User attributes", modify the SAML attribute names to match your IdP if needed, or accept the default names.
{% endif %}
{% ifversion ghec or ghes %}
{%- ifversion ghec %}
{% endif %}