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.
Prerequisites
-
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.
Generating credentials for Azure Maps
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.
-
Below the headings, type or paste your authentication details for Azure Maps.
-
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.