Tutorial: Azure Active Directory single sign-on (SSO) integration with GitHub Enterprise Cloud - Enterprise Account
In this tutorial, you'll learn how to integrate GitHub Enterprise Cloud - Enterprise Account with Azure Active Directory (Azure AD). When you integrate GitHub Enterprise Cloud - Enterprise Account with Azure AD, you can:
- Control in Azure AD who has access to a GitHub Enterprise Account and any organizations within the Enterprise Account.
To get started, you need the following items:
- An Azure AD subscription. If you don't have a subscription, you can get a free account.
- A GitHub Enterprise Account.
- A GitHub user account that is an Enterprise Account owner.
In this tutorial, you configure and test Azure AD SSO in a test environment.
- GitHub Enterprise Cloud - Enterprise Account supports SP and IDP initiated SSO.
- GitHub Enterprise Cloud - Enterprise Account supports Just In Time user provisioning.
Adding GitHub Enterprise Cloud - Enterprise Account from the gallery
To configure the integration of GitHub Enterprise Cloud - Enterprise Account into Azure AD, you need to add GitHub Enterprise Cloud - Enterprise Account from the gallery to your list of managed SaaS apps.
- Sign in to the Azure portal using either a work or school account, or a personal Microsoft account.
- On the left navigation pane, select the Azure Active Directory service.
- Navigate to Enterprise Applications and then select All Applications.
- To add new application, select New application.
- In the Add from the gallery section, type GitHub Enterprise Cloud - Enterprise Account in the search box.
- Select GitHub Enterprise Cloud - Enterprise Account from results panel and then add the app. Wait a few seconds while the app is added to your tenant.
Alternatively, you can also use the Enterprise App Configuration Wizard. In this wizard, you can add an application to your tenant, add users/groups to the app, assign roles, as well as walk through the SSO configuration as well. Learn more about Microsoft 365 wizards.
Configure and test Azure AD SSO for GitHub Enterprise Cloud - Enterprise Account
Configure and test Azure AD SSO with GitHub Enterprise Cloud - Enterprise Account using a test user called B.Simon. For SSO to work, you need to establish a link relationship between an Azure AD user and the related user in GitHub Enterprise Cloud - Enterprise Account.
To configure and test Azure AD SSO with GitHub Enterprise Cloud - Enterprise Account, perform the following steps:
- Configure Azure AD SSO - to enable your users to use this feature.
- Create an Azure AD test user - to test Azure AD single sign-on with B.Simon.
- Assign your Azure AD user and the test user account to the GitHub app - to enable your user account and test user
B.Simonto use Azure AD single sign-on.
- Enable and Test SAML for the Enterprise Account and its organizations - to configure the single sign-on settings on application side.
- Test SSO with another enterprise account owner or organization member account - to verify whether the configuration works.
Configure Azure AD SSO
Follow these steps to enable Azure AD SSO in the Azure portal.
In the Azure portal, on the GitHub Enterprise Cloud - Enterprise Account application integration page, find the Manage section and select single sign-on.
On the Select a single sign-on method page, select SAML.
On the Set up single sign-on with SAML page, click the pencil icon for Basic SAML Configuration to edit the settings.
On the Basic SAML Configuration section, if you wish to configure the application in IDP initiated mode, enter the values for the following fields:
a. In the Identifier (Entity ID) text box, type a URL using the following pattern:
b. In the Reply URL text box, type a URL using the following pattern:
Click Set additional URLs and perform the following step if you wish to configure the application in SP initiated mode:
In the Sign on URL text box, type a URL using the following pattern:
<ENTERPRISE-SLUG>with the actual name of your GitHub Enterprise Account.
On the Set up single sign-on with SAML page, in the SAML Signing Certificate section, find Certificate (Base64) and select Download to download the certificate and save it on your computer.
On the Set up GitHub Enterprise Cloud - Enterprise Account section, copy the appropriate URL(s) based on your requirement.
Create an Azure AD test user
In this section, you'll create a test user in the Azure portal called
- From the left pane in the Azure portal, select Azure Active Directory, select Users, and then select All users.
- Select New user at the top of the screen.
- In the User properties, follow these steps:
- In the Name field, enter
- In the User name field, enter the email@example.com. For example,
- Select the Show password check box, and then write down the value that's displayed in the Password box.
- Click Create.
- In the Name field, enter
Assign your Azure AD user and the test user account to the GitHub app
In this section, you'll enable
B.Simon and your user account to use Azure single sign-on by granting access to GitHub Enterprise Cloud - Enterprise Account.
- In the Azure portal, select Enterprise Applications, and then select All applications.
- In the applications list, select GitHub Enterprise Cloud - Enterprise Account.
- In the app's overview page, find the Manage section and select Users and groups.
- Select Add user, then select Users and groups in the Add Assignment dialog.
- In the Users and groups dialog, select B.Simon and your user account from the Users list, then click the Select button at the bottom of the screen.
- If you are expecting a role to be assigned to the users, you can select it from the Select a role dropdown. If no role has been set up for this app, you see "Default Access" role selected.
- In the Add Assignment dialog, click the Assign button.
Enable and Test SAML for the Enterprise Account and its organizations
To configure single sign-on on the GitHub Enterprise Cloud - Enterprise Account side, follow the steps listed in this GitHub documentation.
- Sign in to GitHub.com with a user account that is an enterprise account owner.
- Copy the value from the
Login URLfield in the app from the Azure portal and paste it in the
Sign on URLfield in the GitHub Enterprise Account SAML settings.
- Copy the value from the
Azure AD Identifierfield in the app from the Azure portal and paste it in the
Issuerfield in the GitHub Enterprise Account SAML settings.
- Copy the contents of the Certificate (Base64) file you downloaded in the steps above from Azure portal and paste them in the appropriate field in the GitHub Enterprise Account SAML settings.
- Click the
Test SAML configurationand confirm that you are able to authenticate from the GitHub Enterprise Account to Azure AD successfully.
- Once the test is successful, save the settings.
- After authenticating via SAML for the first time from the GitHub enterprise account, a linked external identity will be created in the GitHub enterprise account that associates the signed in GitHub user account with the Azure AD user account.
After you enable SAML SSO for your GitHub Enterprise Account, SAML SSO is enabled by default for all organizations owned by your Enterprise Account. All members will be required to authenticate using SAML SSO to gain access to the organizations where they are a member, and enterprise owners will be required to authenticate using SAML SSO when accessing an Enterprise Account.
Test SSO with another enterprise account owner or organization member account
After the SAML integration is set up for the GitHub enterprise account (which also applies to the GitHub organizations in the enterprise account), other enterprise account owners who are assigned to the app in Azure AD should be able to navigate to the GitHub enterprise account URL (
https://github.com/enterprises/<enterprise account>), authenticate via SAML, and access the policies and settings under the GitHub enterprise account.
An organization owner for an organization in an enterprise account should be able to invite a user to join their GitHub organization. Sign in to GitHub.com with an organization owner account and follow the steps in the article to invite
B.Simon to the organization. A GitHub user account will need to be created for
B.Simon if one does not already exist.
To test GitHub organization access under the Enterprise Account with the
B.Simon test user account:
B.Simonto an organization under the Enterprise Account as an organization owner.
- Sign in to GitHub.com using the user account you would like to link to the
B.SimonAzure AD user account.
- Sign in to Azure AD using the
- Go to the GitHub organization. The user should be prompted to authenticate via SAML. After successful SAML authentication,
B.Simonshould be able to access organization resources.
Once you configure GitHub Enterprise Cloud - Enterprise Account you can enforce session control, which protects exfiltration and infiltration of your organization’s sensitive data in real time. Session control extends from Conditional Access. Learn how to enforce session control with Microsoft Defender for Cloud Apps.