Learn how users can request a license and receive access immediately.
When you've enabled GitHub Copilot in an organization or enterprise, you can set up a self-serve workflow to allow users to request licenses. This allows you to allocate licenses to people who want them, and means people can get started with Copilot quickly.
GitHub has found that many successful rollouts offer a fully self-service model where developers can claim a license without approval.
This article outlines two approaches your company can take:
If you have a Copilot Business subscription, members of an organization can request access to GitHub Copilot on their settings page. Then, an organization owner must review and approve each request.
The process, which you should communicate with users, is as follows.
You should set up a process where requests are reviewed regularly, so that interested users can get access to Copilot quickly.
Users can also request access from organizations where Copilot Business is not enabled. In this case, organization owners will be prompted to ask an enterprise owner to enable Copilot for the organization.
For a more streamlined approach, you can set up a self-serve process by integrating with GitHub's API. The benefits of this approach are that it allows you to build the process into your existing tooling, and it gives you the option to allow users to receive access instantly, without a manual approval process.
To set up the integration, you will use the Add users to the Copilot subscription for an organization endpoint, providing the username of the user who has requested access.
For example, the API call in a GitHub Actions workflow might look as follows, where the organization and selected usernames are provided by the context of the workflow trigger:
const { Octokit } = require("@octokit/action"); const octokit = new Octokit(); const response = await octokit.request('POST /orgs/{org}/copilot/billing/selected_users', { org: context.repo.owner, selected_usernames: [context.payload.sender.login], headers: { 'X-GitHub-Api-Version': '2022-11-28' } })
Note
This endpoint only works if you use organizations on GitHub. If GitHub has provided you with a dedicated enterprise for managing Copilot Business licenses, you will need to add users to enterprise teams instead. To request API documentation, please contact your account manager.