Skip to main content

Conectar uma assinatura do Azure

Se você usar o GitHub Enterprise Cloud por meio de um Microsoft Enterprise Agreement, poderá habilitar e pagar pela cobrança baseada em uso no GitHub.com conectando uma assinatura do Azure.

About connection of an Azure subscription

You can pay for usage of GitHub Enterprise Cloud features through Azure by connecting an Azure Subscription ID to your organization or enterprise account on GitHub.com.

In this article, the instructions that you must follow to connect an Azure subscription depend on whether your company uses a single organization or an enterprise account on GitHub.com. For more information about the differences between these two types of accounts, see "Types of GitHub accounts."

If you use GitHub Enterprise Cloud through a Microsoft Enterprise Agreement, connection to an Azure subscription is the only way to use GitHub Codespaces and Copilot Business, or to use GitHub Actions and GitHub Packages beyond your plan's included amounts.

About usage-based billing on GitHub.com

GitHub provides usage-based billing for the following features and situations. You can learn more about billing and spending limits.

Billed feature or situationInformation about billingInformation about spending limits
GitHub Codespaces usage"About billing for GitHub Codespaces""About billing for GitHub Codespaces"
GitHub Actions usage beyond the amounts included with your plan"About billing for GitHub Actions""About billing for GitHub Actions"
GitHub Packages usage beyond the amounts included with your plan"About billing for GitHub Packages""About billing for GitHub Packages"
Copilot Business usage"About billing for GitHub Copilot"N/A

About billing through Azure

If you link your GitHub account to Azure, any usage-based costs starting from that point will be billed through Azure and charged on the 1st of each month. However, remaining GitHub charges, for example charges for your GitHub plan, will still be billed on your usual billing date.

For example, you link your Azure subscription to your organization or enterprise account on June 16th and you also have a GitHub Copilot Business subscription. From that date onwards, any usage costs for Copilot Business will be included in your Azure bill and charged on July 1st. However, any charges incurred before June 16th for Copilot Business will be billed separately through GitHub on your account's usual billing date.

Prerequisites

  • You must have either an organization or an enterprise account on GitHub.com. For more information about the differences between these two types of accounts, see "Types of GitHub accounts."

    • If your enterprise account on GitHub.com is on a free trial of GitHub Enterprise Cloud, you cannot connect an Azure subscription.
    • If the organization you want to connect an Azure subscription to belongs to an enterprise account, you must connect your Azure subscription to the enterprise account, not the organization.
  • You must be an owner of the organization or enterprise account. For more information, see the following articles.

  • You must be logged into Azure as a user who is able to provide tenant-wide admin consent, which is required to install GitHub's Subscription Permission Validation app on the Azure AD tenant. The app requires read access to display a list of available subscriptions, and is only used during this one-time process of connecting the Azure subscription. For more information, see Grant tenant-wide admin consent to an application in Microsoft Docs.

    • Alternatively, before following the instructions in this article, users who are not able to provide tenant-wide admin consent can work with an Azure AD global administrator to configure an admin consent workflow. For more information, see User and admin consent in Azure Active Directory in Microsoft Docs.
  • To select an Azure subscription from the list of available subscriptions, the user must be an owner of the Azure subscription. For more information, see Assign a user as an administrator of an Azure subscription in Microsoft docs.

  • You must know your Azure subscription ID. For more information, see Get subscription and tenant IDs in the Azure portal in the Microsoft Docs or contact Azure support.

Video demonstration of connecting a subscription

To connect an Azure subscription, you'll need appropriate access permissions on both GitHub Enterprise Cloud and the Azure billing portal. This may require coordination between two different people.

To see a demo of the process from beginning to end, see Billing GitHub consumption through an Azure subscription on GitHub's YouTube channel. This video demonstrates the process for an enterprise account. If you're connecting a subscription to an organization account, see "Connecting your Azure subscription to your organization account."

Connecting your Azure subscription to your enterprise account

To connect your Azure subscription, you must have owner permissions to the Azure subscription and be an enterprise owner on GitHub.

  1. In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.

  2. In the list of enterprises, click the enterprise you want to view.

  3. In the enterprise account sidebar, click Settings.

  4. Under Settings, click Billing.

  5. Under "Billing", click Payment information.

  6. Under "Payment Information", click Add Azure Subscription.

  7. To sign in to your Microsoft account, follow the prompts.

  8. Review the "Permissions requested" prompt. If you agree with the terms, click Accept.

    If you don't see a "Permissions requested" prompt, and instead see a message indicating that you need admin approval, see "Message: "Need admin approval"."

  9. Under "Select a subscription", select the Azure subscription ID that you want to connect to your enterprise. To select an Azure subscription, you must have owner permissions to the subscription. If the default tenant does not have the right permissions, you may need to specify a different tenant ID. For more information, see "Prerequisites" and Microsoft identity platform and OAuth 2.0 authorization code flow in Microsoft Docs.

  10. Select By clicking "Connect", you are confirming that you want to be billed for metered services via the selected Azure subscription.

  11. Click Connect.

Disconnecting your Azure subscription from your enterprise account

After you disconnect your Azure subscription from your enterprise account, your usage can no longer exceed the amounts included with your plan.

  1. In the top-right corner of GitHub.com, click your profile photo, then click Your enterprises.

  2. In the list of enterprises, click the enterprise you want to view.

  3. In the enterprise account sidebar, click Settings.

  4. Under Settings, click Billing.

  5. Under "Billing", click Payment information.

  6. Under "Azure subscription", to the right of the subscription ID you want to disconnect, click .

  7. Review the prompt, then click Remove.

Troubleshooting connection of an Azure subscription

You can troubleshoot some common issues with connection of an Azure subscription to your account on GitHub.com.

Message: "Need admin approval"

If the user account you used to sign into Azure does not have adequate permissions to install the app that GitHub uses to connect a subscription, you'll see a message with the following text.

Need admin approval

GitHub Inc needs permission to access resources in your organisation that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.

To avoid this message when you try again, you must either ensure that the Azure user can provide tenant-wide admin consent, or you must work with an Azure administrator to configure the admin consent workflow. For more information, review "Prerequisites".