<h2>Integrate with GitHub Enterprise Cloud</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2024" /><meta name="DC.rights.owner" content="(C) Copyright 2024" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="task" /><meta name="DC.title" content="Integrate with GitHub Enterprise Cloud" /><meta name="abstract" content="You can integrate your ServiceNow instance with the GitHub Enterprise Cloud application to track your software subscriptions and reclaim unused licenses." /><meta name="description" content="You can integrate your ServiceNow instance with the GitHub Enterprise Cloud application to track your software subscriptions and reclaim unused licenses." /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2023-08-03" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="integrate-with-github-cloud" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Integrate with GitHub Enterprise Cloud</title></head><body> <div class="nested0" id="integrate-with-github-cloud"> <h1 class="title topictitle1" id="ariaid-title1">Integrate with <span class="ph">GitHub</span> Enterprise Cloud</h1> <p class="shortdesc">You can integrate your <span class="ph">ServiceNow</span> instance with the <span class="ph">GitHub</span> Enterprise Cloud application to track your software subscriptions and reclaim unused licenses.</p> <div class="topic task nested1" id="generate-api-key-github-cloud"> <h2 class="title topictitle2" id="ariaid-title2">Generate an API access token for <span class="ph">GitHub</span> Enterprise Cloud</h2> <div class="body taskbody"><p class="shortdesc">Generate a token that you can use to access the <span class="ph">GitHub</span> Enterprise Cloud API.</p> <div class="section prereq p"> <p class="p"><span class="ph">GitHub</span> Role required: organization owner</p> <p class="p">The user account that you use for authentication should be able to read all repositories in the organization they are a part of.</p> </div> <div class="section context" id="generate-api-key-github-cloud__context_f5l_js5_vnb"> <p class="p">The <span class="ph">GitHub</span> repository hosting service uses personal access tokens to grant users access to the <span class="ph">GitHub</span> API. Personal access tokens function similarly to OAuth access tokens by authorizing API requests. By generating a personal access token to authorize your <span class="ph">GitHub</span> Enterprise Cloud API requests, you can gain access to the <span class="ph">GitHub</span> Enterprise Cloud API.</p> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">From a web browser, open <a class="xref" href="https://github.com/" target="_blank" rel="noopener noreferrer">GitHub</a>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Sign in to your <span class="ph">GitHub</span> account.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph">GitHub</span> page header, click your profile photo and then select <span class="ph uicontrol">Settings</span>.</span> <div class="itemgroup stepresult">Your profile settings open.</div> </li><li class="li step stepexpand"> <span class="ph cmd">From the left navigation pane, select <span class="ph uicontrol">Developer Settings</span>.</span> <div class="itemgroup stepresult">Your developer settings open.</div> </li><li class="li step stepexpand"> <span class="ph cmd">From the left navigation pane, select <span class="ph uicontrol">Personal access tokens</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Select <span class="ph uicontrol">Tokens (classic)</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the Personal access tokens page, click <span class="ph uicontrol">Generate new token</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Select <span class="ph uicontrol">Generate new token (classic)</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">If you are prompted to confirm your password before proceeding, enter your <span class="ph">GitHub</span> password and then click <span class="ph uicontrol">Confirm password</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the New personal access token form, describe the purpose of the token in the <span class="ph uicontrol">Note</span> field.</span> </li><li class="li step stepexpand"> <span class="ph cmd">To give your token an expiration, select the Expiration drop-down menu and select a default value or use the calendar picker.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the Select scopes form section, enable the repo and admin:org OAuth scopes.</span> <div class="itemgroup info">OAuth scopes limit the level of access that the application has to your protected resources. The repo OAuth scope gives you full control of your private repositories. The admin:org OAuth scope enables you to manage your entire organization, including all teams, projects, and memberships. See <a class="xref" href="https://docs.github.com/en/free-pro-team@latest/developers/apps/scopes-for-oauth-apps" target="_blank" rel="noopener noreferrer">Scopes for OAuth Apps</a> for more information about <span class="ph">GitHub</span> OAuth scopes.</div> <ol type="a" class="ol substeps" id="generate-api-key-github-cloud__substeps_uh3_zpp_wnb"><li class="li substep substepexpand"> <span class="ph cmd">Enable the repo OAuth scope by selecting the <span class="ph uicontrol">repo</span> check box.</span> <div class="itemgroup info">By enabling this OAuth scope, you automatically enable the repo:status, repo_deployment, public_repo, repo:invite, and security_events OAuth scopes.</div> </li><li class="li substep substepexpand"> <span class="ph cmd">Enable the admin:org OAuth scope by selecting the <span class="ph uicontrol">admin:org</span> check box.</span> <div class="itemgroup info">By enabling this OAuth scope, you automatically enable both the write:org and read:org OAuth scopes.</div> </li></ol> </li><li class="li step stepexpand"> <span class="ph cmd">Click <span class="ph uicontrol">Generate token</span>.</span> <div class="itemgroup stepresult">Your personal access token generates.</div> </li><li class="li step stepexpand"> <span class="ph cmd">Copy the access token and save it in a secure location for later use.</span> </li><li class="li step stepexpand"> <span class="ph cmd">To use your token to access resources owned by an organization that uses SAML single sign-on, authorize the token.</span> <div class="itemgroup info">For more information, see <a class="xref" href="https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on" target="_blank" rel="noopener noreferrer">Authorizing a personal access token for use with SAML single sign-on</a>.</div> </li></ol> </div> </div> <div class="topic task nested1" id="create-github-cloud-connection"> <h2 class="title topictitle2" id="ariaid-title3">Create a <span class="ph">GitHub</span> Enterprise Cloud connection</h2> <div class="body taskbody"><p class="shortdesc">Create a connection between your <span class="ph">GitHub</span> Enterprise Cloud applications and your <span class="ph">ServiceNow</span> instance.</p> <div class="section prereq p"> <p class="p">If you want to use a <span class="ph">MID Server</span> for communication between your <span class="ph">ServiceNow</span> instance and your <span class="ph">GitHub</span> Enterprise Cloud applications, you must first set up a <span class="ph">MID Server</span> on your instance. See <a class="xref" href="../product/mid-server/concept/mid-server-landing.dita/mid-server-landing.html" target="_blank" rel="noopener noreferrer">MID Server</a> for detailed instructions.</p> <p class="p"><span class="ph">ServiceNow</span> Role required: admin</p> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">From your <span class="ph">ServiceNow</span> instance, navigate to <span class="ph menucascade"><span class="ph uicontrol">Process Automation</span> > <span class="ph uicontrol">Flow Designer</span></span>.</span> <div class="itemgroup stepresult">The Flow Designer launches in a new tab.</div> </li><li class="li step stepexpand"> <span class="ph cmd">Select the <span class="ph uicontrol">Connections</span> tab.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Click <span class="ph uicontrol">View Details</span> for your <span class="ph">GitHub</span> connection.</span> </li><li class="li step stepexpand"> <span class="ph cmd">From the list of available connections, locate <span class="ph">GitHub</span> and then click <span class="ph uicontrol">Configure</span>.</span> <div class="itemgroup stepresult">The Configure Connection dialog box opens.</div> </li><li class="li step stepexpand"> <span class="ph cmd">In the dialog box, fill in the fields.</span> <div class="itemgroup info"> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="create-github-cloud-connection__table_skk_54h_wnb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 1. </span>Configure Connection dialog box</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d75242e456">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d75242e459">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e456 ">Connection Name</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e459 ">Name of the <span class="ph">GitHub</span> connection.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e456 ">Connection URL</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e459 ">URL of the <span class="ph">GitHub</span> API endpoint. Enter https://api.github.com.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e456 ">Use <span class="ph">MID Server</span></td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e459 ">Option that enables your <span class="ph">ServiceNow</span> instance to use a <span class="ph">MID Server</span> for communication with your <span class="ph">GitHub</span> Enterprise Cloud applications. If your instance requires a <span class="ph">MID Server</span>, set this field to true. If your instance does not require a <span class="ph">MID Server</span>, leave this field empty.<div class="note important"><span class="importanttitle">Important:</span> To enable this option, you must already have a <span class="ph">MID Server</span> set up on your instance. See <a class="xref" href="../product/mid-server/concept/mid-server-landing.dita/mid-server-landing.html" target="_blank" rel="noopener noreferrer">MID Server</a> for detailed instructions.</div> </td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e456 ">API Key</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e459 ">Personal access token that enables you to access the <span class="ph">GitHub</span> Enterprise Cloud API. <ul class="ul" id="create-github-cloud-connection__ul_k3s_1qw_5wb"><li class="li">If the <span class="ph">GitHub</span> spoke version installed is 2.2.5 or higher, enter <api-key>.</li><li class="li">If the <span class="ph">GitHub</span> spoke version installed is lower than 2.2.5, enter Bearer <api-key>.</li></ul> The <<var class="keyword varname">api-key</var>> is the personal access token that you generated in <a class="xref" href="integrate-with-github-cloud.html#generate-api-key-github-cloud" title="Generate a token that you can use to access the GitHub Enterprise Cloud API.">Generate an API access token for GitHub Enterprise Cloud</a></td></tr></tbody></table> </div> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">Click <span class="ph uicontrol">Configure Connection</span>.</span> </li></ol> </div> </div> <div class="topic task nested1" id="create-integration-profile-github-cloud"> <h2 class="title topictitle2" id="ariaid-title4">Create a <span class="ph">GitHub</span> Enterprise Cloud integration profile</h2> <div class="body taskbody"><p class="shortdesc">Create a <span class="ph">GitHub</span> Enterprise Cloud integration profile to track software subscriptions and optimize licensing for your <span class="ph">GitHub</span> Enterprise Cloud applications.</p> <div class="section prereq p"> <p class="p">To create a <span class="ph">GitHub</span> Enterprise Cloud integration profile, request the <span class="ph">Software Asset Management</span> - <span class="ph">SaaS License Management</span> plugin (com.sn_sam_saas_int) from the <a class="xref" href="https://store.servicenow.com/" target="_blank" rel="noopener noreferrer">ServiceNow Store</a>.</p> <p class="p"><span class="ph">ServiceNow</span> Role required: sam_integrator or admin</p> </div> <div class="section context" id="create-integration-profile-github-cloud__context_d14_xf2_4tb"> <p class="p">If you are using Software Asset Workspace, the option to create the <span class="ph">GitHub</span> Cloud integration profile in Core UI is inactive.</p> </div> <ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">Navigate to the integration profile.</span> <table border="1" frame="hsides" rules="rows" cellpadding="4" cellspacing="0" summary="" class="simpletable choicetable choicetableborder" id="create-integration-profile-github-cloud__choicetable_o3p_z3k_qtb"><colgroup><col style="width:50%" /><col style="width:50%" /><table><thead><tr class="sthead chhead"><th class="stentry choptionhd" style="vertical-align:bottom;text-align:left;" id="d75242e677-option">Interface</th><th class="stentry chdeschd" style="vertical-align:bottom;text-align:left;" id="d75242e677-desc">Action</th></tr></thead><tbody><tr class="strow chrow"><th style="vertical-align:top;" headers="d75242e677-option" id="d75242e690" class="stentry choption">Core UI</th><td style="vertical-align:top;" headers="d75242e677-desc d75242e690" class="stentry chdesc"> <ol class="ol" type="a" id="create-integration-profile-github-cloud__ol_ijd_bjk_qtb"><li class="li">Navigate to <span class="ph menucascade"><span class="ph uicontrol">All</span> > <span class="ph uicontrol">Software Asset</span> > <span class="ph uicontrol">SaaS License</span> > <span class="ph uicontrol">Direct Integration Profiles</span></span>.</li><li class="li">Select <span class="ph uicontrol">New</span>.</li><li class="li">Select <span class="ph uicontrol">GitHub Cloud Integration Profile</span>.</li></ol> </td></tr><tr class="strow chrow"><th style="vertical-align:top;" headers="d75242e677-option" id="d75242e732" class="stentry choption">Software Asset Workspace</th><td style="vertical-align:top;" headers="d75242e677-desc d75242e732" class="stentry chdesc"> <ol class="ol" type="a" id="create-integration-profile-github-cloud__ol_wjd_bjk_qtb"><li class="li">Navigate to <span class="ph menucascade"><span class="ph uicontrol">License operations</span> > <span class="ph uicontrol">User Subscriptions</span> > <span class="ph uicontrol">Direct integration profiles</span></span>.</li><li class="li">Select <span class="ph uicontrol">New</span>.</li><li class="li">Select <span class="ph uicontrol">GitHub Cloud</span> from the drop-down list.</li><li class="li">Select <span class="ph uicontrol">Continue</span>.</li></ol> </td></tr></tbody></table><ul><li class="li step stepexpand"> <span class="ph cmd">On the form, fill in the fields.</span> <div class="itemgroup info"> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="create-integration-profile-github-cloud__table_wqc_y5h_wnb" class="table" frame="border" border="1" rules="all"><caption><span class="tablecap"><span class="table--title-label">Table 2. </span>Integration Profile form</span></caption><colgroup><col /><col /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry cellrowborder" style="vertical-align:top;" id="d75242e800">Field</th><th class="entry cellrowborder" style="vertical-align:top;" id="d75242e803">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e800 ">Display Name</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e803 ">Name of the integration profile. For example, GitHub Cloud Integration.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e800 ">Connection & Credential</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e803 ">Connection and credential alias for the <span class="ph">GitHub</span> spoke. This field is automatically set to <samp class="ph systemoutput">sn_github_spoke.GitHub</samp>.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e800 ">Status</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e803 ">Status of the integration profile. If you have not published the integration profile, this field is automatically set to <span class="ph uicontrol">Draft</span>. If you have already published the integration profile, this field is automatically set to <span class="ph uicontrol">Published</span>.</td></tr><tr class="row"><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e800 ">Profile type</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d75242e803 ">Type of integration profile. This field is automatically set to <samp class="ph systemoutput">github_cloud_subscription</samp>.</td></tr></tbody></table> </div> </div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Download Subscription Subflow</span> tab, verify that the <span class="ph uicontrol">Subflow</span> field is set to <span class="ph uicontrol">GitHub Cloud Download Subscriptions</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Calculate Activity Subflow</span> tab, verify that the <span class="ph uicontrol">Subflow</span> field is set to <span class="ph uicontrol">GitHub Cloud Update User Activity</span>.</span> <div class="itemgroup info"> <div class="p">You can also select the date and time that you want to analyze user activity from in the Analyze user activity from field. By default, you can analyze user activity up to 60 days prior to the current date and view events performed by individual users from the time you create this profile. <div class="note"><span class="notetitle">Note:</span> <span class="ph">Software Asset Management</span> pulls the events from the time that you start analyzing user activity irrespective of the profile creation date.</div> You can modify this value in the Last activity threshold field of your software reclamation rules. For more information, see <a class="xref" href="add-reclamation-rule-sub.html" title="Use reclamation rules to cancel user subscriptions that have limited to no activity.">Review a software reclamation rule</a>.</div> <div class="note tip"><span class="tiptitle">Tip:</span> To avoid performance issues with this subflow, <span class="ph">ServiceNow</span> recommends setting the <span class="ph uicontrol">Analyze user activity from</span> field to a maximum of seven days prior to the current date.</div> </div> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="ph uicontrol">Reclaim Subscription Subflow</span> tab, verify that the <span class="ph uicontrol">Subflow</span> field is set to <span class="ph uicontrol">GitHub Cloud Reclaim Subscription</span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">Click <span class="ph uicontrol">Save</span>.</span> <div class="itemgroup stepresult">Your <span class="ph">ServiceNow</span> instance creates a draft integration profile. The integration profile uses the <span class="ph">GitHub</span> Cloud Download Subscriptions, <span class="ph">GitHub</span> Cloud Update User Activity, and <span class="ph">GitHub</span> Cloud Reclaim Subscription subflows to retrieve user data from your <span class="ph">GitHub</span> Enterprise Cloud applications.</div> </li><li class="li step stepexpand"> <span class="ph cmd">After the form reloads, click <span class="ph uicontrol">Publish</span>.</span> <div class="itemgroup stepresult">The Publish Confirmation dialog box opens.</div> </li><li class="li step stepexpand"> <span class="ph cmd">In the dialog box, click <span class="ph uicontrol">OK</span>.</span> </li><li><div class="section postreq" id="create-integration-profile-github-cloud__postreq_mps_3z1_njb"> <p class="p">After the integration connects, your <span class="ph">ServiceNow</span> instance automatically creates software models, reclamation rules, and user subscriptions that are refreshed daily.</p> <p class="p">Review all automatically generated reclamation rules to ensure that they meet your specifications for reclaiming user subscriptions. For more information, see <a class="xref" href="add-reclamation-rule-sub.html" title="Use reclamation rules to cancel user subscriptions that have limited to no activity.">Review a software reclamation rule</a>.</p> <div class="p">Create software entitlements for the automatically generated software models to track used software against owned software.<ul class="ul" id="create-integration-profile-github-cloud__ul_cbz_vhr_sqb"><li class="li">For more information on creating software entitlements in the <span class="ph">Software Asset Management</span> classic application, see <a class="xref" href="track-software-rights.html" title="Create entitlements in the Software Asset Management application classic to record your license details and allocate purchased software rights to users or devices.">Create entitlements in Software Asset Management classic</a>.</li><li class="li">For more information on creating software entitlements in the Software Asset Workspace, see <a class="xref" href="create-entitlements-workspace.html" title="Create entitlements in the Software Asset Workspace to enter your license details and allocate purchased software rights to users or devices.">Create entitlements in workspace</a>.</li><li class="li">For more information on creating software entitlements using the <span class="ph">Software Asset Management</span> Playbook, see <a class="xref" href="guidedwalk-workspace.html" title="Use the guided walk-through playbook for a step-by-step process of creating entitlements.">Create entitlements using the guided walk-through</a>.</li></ul> </div> <div class="p">Reconciliation also runs on your subscriptions as a scheduled job or on-demand. You can view your reconciliation results in the <a class="xref" href="../concept/sam-license-workbench.html" title="Review reconciliation results in a simplified workbench view.">License Workbench</a> (<span class="ph">Software Asset Management</span> classic application) or the <a class="xref" href="../concept/sam-workspace-workbench.html" title="Use the license usage view as a single plane to understand the license position of all software products, remediate non compliance, view reconciliation results, view or add removal candidates and view Software Asset Management related reports.">License usage view</a> (Software Asset Workspace). Use these results to determine your license compliance position and to remediate any non-compliance.<ul class="ul" id="create-integration-profile-github-cloud__ul_qgf_zhr_sqb"><li class="li">For more information on running reconciliation in the <span class="ph">Software Asset Management</span> classic application, see <a class="xref" href="t_RunReconciliation.html" title="Reconciliation is run as a scheduled job (default is weekly), but you can also run reconciliation manually to reconcile software products in your environment on demand.">Run software reconciliation</a>.</li><li class="li">For more information on running reconciliation in the Software Asset Workspace, see <a class="xref" href="run-recon-workspace.html" title="Reconciliation is run as a scheduled job (default is weekly), but you can also run reconciliation manually to reconcile software products in the Software Asset Workspace environment on-demand.">Run software reconciliation in the workspace</a>.</li></ul> </div> </div> </li></ul></colgroup></table></li></ol></div></div></div></body></html></div>