About interactive maps
You can allow users of your GitHub Enterprise Server instance to create interactive maps using GeoJSON or TopoJSON syntax. For more information about creation of interactive maps, see "Creating diagrams."
To enable interactive maps, you must provide authentication credentials for Azure Maps.
Warning: Authentication with Azure Maps using an API token is sunset in GitHub Enterprise Server 3.10.4 and later. If you upgrade to the latest release of GitHub Enterprise Server on an instance already configured to authenticate with an API token, interactive maps will be disabled. You must reconfigure authentication using role-based access control (RBAC) for an application on a Microsoft Entra ID (previously known as Azure AD) tenant. For more information, see the "Deprecations" section in the release notes.
Prerequisites
The following prerequisites apply if your instance runs GitHub Enterprise Server 3.10.4 or later.
-
To configure interactive maps for your instance, you must have administrative access to a tenant in Microsoft Entra ID. For more information, contact the administrator for Microsoft resources at your company, or see Quickstart: Create a new tenant in Microsoft Entra ID on Microsoft Learn.
-
You must know the tenant ID for your tenant in Entra ID. For more information, see Get subscription and tenant IDs in the Azure portal on Microsoft Learn.
-
Your instance must be able to access https://login.microsoftonline.com.
If your instance runs a release of GitHub Enterprise Server in the 3.10 series earlier than 3.10.3, you must provide an API token for Azure Maps instead.
Warning: GitHub does not recommend the use of an Azure Maps API token for authentication. To improve security, upgrade to the latest patch release of GitHub Enterprise Server and reconfigure Azure Maps authentication. After you upgrade, interactive maps will be disabled for your instance until you reconfigure authentication. For more information, see the "Deprecations" section in the release notes.
Generating credentials for Azure Maps
To configure authentication for Azure Maps using RBAC, your instance must run GitHub Enterprise Server 3.10.4 or later.
To generate credentials for Azure Maps, you must create an application for your tenant in Entra ID, provide the application access to an Azure Maps account, and configure role-based access control (RBAC).
-
Register a new application on your Entra ID tenant. For more information, see Quickstart: Register an application with the Microsoft identity platform on Microsoft Learn.
- When you specify supported account types, select Accounts in this organizational directory only.
-
Add a client secret. For more information, see Quickstart: Register an application with the Microsoft identity platform on Microsoft Learn.
-
Store the value of the secret in a secure location that you can reference when you configure authentication on your GitHub Enterprise Server instance. Entra will never display the value after you leave the page.
-
Configure access to the secret by Azure Maps.
- While viewing the details for the application you configured on your Entra ID tenant, in the left-hand sidebar, click API permissions.
- Click Add a permission.
- Click Azure Maps.
- Select Delegated permissions.
- Under "Select permissions", select "
user_impersonation
". - To save the permissions, click Add permissions.
-
Sign into an Azure Maps account. If you don't have an account, you can create one. For more information, see the Azure Maps Account website.
-
Configure RBAC for Azure Maps. For more information, see Authentication with Azure Maps and Assign Azure roles using the Azure portal on Microsoft Learn.
- On your Entra ID tenant, from Access control (IAM), you must assign the role of "Azure Maps Data Reader" to "User, group, or service principal", select the application you created earlier in these instructions, and complete the form.
Enabling interactive maps
After you create an application on your Entra ID tenant and generate a secret for the use of Azure Maps, you can configure interactive maps on your GitHub Enterprise Server instance.
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
In the " Site admin" sidebar, click Management Console.
-
In the "Settings" sidebar, click Privacy and uncheck Privacy mode.
-
To enable interactive maps, select "Enable GeoJSON rendering".
-
Generate a 32-character string to use as a secret to prevent cross-site request forgery (CSRF). For example, you can access the administrative shell and use
openssl
on your GitHub Enterprise Server instance to generate a string. For more information, see "Accessing the administrative shell (SSH)."Shell openssl rand -hex 32
openssl rand -hex 32
Store the string in a secure location that you can reference in the next step.
-
Enter your authentication details for Azure Maps.
-
If your instance runs a release of GitHub Enterprise Server in the 3.10 series earlier than 3.10.3, below "Azure Maps API Token", type or paste your token.
Warning: GitHub does not recommend the use of an Azure Maps API token for authentication. To improve security, upgrade to the latest patch release of GitHub Enterprise Server and reconfigure Azure Maps authentication. After you upgrade, interactive maps will be disabled for your instance until you reconfigure authentication. For more information, see the "Deprecations" section in the release notes.
-
If your instance runs GitHub Enterprise Server 3.10.4 or later, below the headings, type or paste the following information.
-
Optionally, to change the style of rendered maps, under "Basemap ID", type the ID for the style you'd like to use.
-
Under the headings, type or paste your authentication details.
Value Description More information Azure Map Client ID Client ID for your Azure Maps account Manage authentication in Azure Maps on Microsoft Learn Azure App Client ID Application (client) ID for the application you created on your Entra ID tenant Create a Microsoft Entra application and service principal that can access resources on Microsoft Learn Azure Tenant ID ID for your tenant on Entra ID "Prerequisites" Azure App Client Secret Client secret that you generated for the application on your Entra ID tenant "Generating credentials for Azure Maps" CSRF Secret 32-character string to prevent CSRF attacks See previous step.
-
-
-
Under the "Settings" sidebar, click Save settings.
Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.
-
Wait for the configuration run to complete.
Disabling interactive maps
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
In the " Site admin" sidebar, click Management Console.
-
In the "Settings" sidebar, click Privacy and uncheck Privacy mode.
-
To disable interactive maps, deselect "Enable GeoJSON rendering".
-
Under the "Settings" sidebar, click Save settings.
Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.
-
Wait for the configuration run to complete.