# Github Copilot - Enterprise

Here are the steps to enable Copilot Metrics API access and generate a GitHub Classic token with the necessary permissions:

#### **Steps to Enable Copilot Metrics API Access**

1. **Go to GitHub Enterprise Settings**:
   * Navigate to the following URL in your browser:\
     `https://github.com/enterprises/{name}/settings/copilot`
   * Replace `{name}` with your organization's name on GitHub.
2. **Enable Copilot Metrics API Access**:
   * Look for the option **"Enable access to the Copilot Metrics API"** under the Copilot settings.
   * Toggle the setting to **ON**.
3. **Save Settings**:
   * After enabling the access, make sure to click **Save settings** to apply the changes.

#### **Steps to Generate a Classic Token with Copilot Access**

1. **Navigate to GitHub Settings**:
   * In the upper-right corner of any page on GitHub, click your **profile photo**.
   * In the dropdown menu, click **Settings**.
2. **Go to Developer Settings**:
   * In the left sidebar, click **Developer settings**.
3. **Generate a Personal Access Token (Classic)**:
   * In the left sidebar, click **Personal access tokens**.
   * Then click on **Tokens (classic)**.
   * Click **Generate new token** and select **Generate new token (classic)**.
4. **Fill Out Token Information**:
   * In the **"Note"** field, provide a descriptive name for the token, such as **Hivel Copilot**.
   * Set an **expiration date** for the token, if needed.
   * Select the required **scopes/permissions** for the token, including:
     * **Under Copilot**:
       * `manage_billing:copilot`
     * **Under Admin Enterprise**:
       * `manage_billing:enterprise`
       * `read:enterprise`
     * **Under Admin Org**:
       * `read:org`
       * `read:user`
5. **Generate the Token**:
   * After selecting the required scopes, click **Generate token** and copy.
6. **Visit Hivel Application:**
   * Under Setting > Integrations > AI Adoption

<figure><img src="/files/8GzycKPfbUere7OXkLw0" alt="" width="375"><figcaption></figcaption></figure>

* Click on **Connect** and select the **Github Copilot Plan** as **Enterprise**:

<figure><img src="/files/aoie0ES7tyzefCAXwUUE" alt="" width="375"><figcaption></figcaption></figure>

* Paste the copied **PAT** and **Enterprise Slug**, verify **GitHub Admin** access and click on **Continue**

<figure><img src="/files/JxkNpsZBxHX3xpCs88Md" alt="" width="375"><figcaption></figcaption></figure>

* Once the integration is successful you can see the card update as below:

<figure><img src="/files/O699nJSKlg8yAnKRQD3q" alt="" width="375"><figcaption></figcaption></figure>

Data will complete sync within 24 hours for past 90 days data.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hivel.ai/integrations/ai-tools/github-copilot-enterprise.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
