|
| 1 | +--- |
| 2 | +title: Configuring interactive maps |
| 3 | +intro: 'You can enable the display of interactive maps in the web interface for {% data variables.location.product_location %}.' |
| 4 | +shortTitle: Configure interactive maps |
| 5 | +permissions: "People with access to the {% data variables.enterprise.management_console %} can configure interactive maps." |
| 6 | +versions: |
| 7 | + feature: azure-maps |
| 8 | +type: how_to |
| 9 | +topics: |
| 10 | + - Enterprise |
| 11 | +--- |
| 12 | + |
| 13 | +## About interactive maps |
| 14 | + |
| 15 | +You can allow users of {% data variables.location.product_location %} to create interactive maps using GeoJSON or TopoJSON syntax. For more information about creation of interactive maps, see "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-geojson-and-topojson-maps)." |
| 16 | + |
| 17 | +To enable interactive maps, you must provide authentication credentials for Azure Maps. |
| 18 | + |
| 19 | +{% ifversion azure-maps-auth-2023 %} |
| 20 | +{% ifversion ghes < 3.13 %} |
| 21 | + |
| 22 | +{% warning %} |
| 23 | + |
| 24 | +**Warning**: Authentication with Azure Maps using an API token is deprecated in {% data variables.product.product_name %} {{ allVersions[currentVersion].currentRelease }}.{% ifversion ghes = 3.7 %}19{% elsif ghes = 3.8 %}12{% elsif ghes = 3.9 %}7{% elsif ghes = 3.10 %}4{% elsif ghes = 3.11 %}1{% endif %} and later. If you upgrade to the latest release of {% data variables.product.product_name %} 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 an Entra ID tenant. {% data reusables.enterprise.azure-maps-auth-deprecation-link %} |
| 25 | + |
| 26 | +{% endwarning %} |
| 27 | + |
| 28 | +{% endif %} |
| 29 | +{% endif %} |
| 30 | + |
| 31 | +## Prerequisites |
| 32 | + |
| 33 | +{% ifversion azure-maps-auth-2023 %} |
| 34 | + |
| 35 | +{% ifversion ghes < 3.12 %} |
| 36 | + |
| 37 | +The following prerequisites apply if your instance runs {% data variables.product.product_name %} {{ allVersions[currentVersion].currentRelease }}.{% ifversion ghes = 3.7 %}19{% elsif ghes = 3.8 %}12{% elsif ghes = 3.9 %}7{% elsif ghes = 3.10 %}4{% elsif ghes = 3.11 %}1{% endif %} or later. |
| 38 | + |
| 39 | +{% endif %} |
| 40 | + |
| 41 | +- To configure interactive maps for your instance, you must have {% ifversion azure-maps-auth-2023 %}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](https://learn.microsoft.com/entra/fundamentals/create-new-tenant) in the Entra ID documentation{% else %}an API token for Azure Maps{% endif %}. |
| 42 | + |
| 43 | +- 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](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant) in the Azure documentation. |
| 44 | + |
| 45 | +- Your instance must be able to access https://login.microsoftonline.com. |
| 46 | + |
| 47 | +{% endif %} |
| 48 | + |
| 49 | +{% ifversion ghes < 3.12 %} |
| 50 | + |
| 51 | +If your instance runs {% ifversion ghes < 3.11 %}a release of {% data variables.product.product_name %} in the {{ allVersions[currentVersion].currentRelease }} series earlier than {% else %}{% data variables.product.product_name %} {% endif %}{{ allVersions[currentVersion].currentRelease }}.{% ifversion ghes = 3.7 %}18{% elsif ghes = 3.8 %}11{% elsif ghes = 3.9 %}6{% elsif ghes = 3.10 %}3{% elsif ghes = 3.11 %}0{% endif %}, you must provide an API token for Azure Maps instead. |
| 52 | + |
| 53 | +{% data reusables.enterprise.azure-maps-auth-warning %} |
| 54 | + |
| 55 | +{% endif %} |
| 56 | + |
| 57 | +{% ifversion azure-maps-auth-2023 %} |
| 58 | + |
| 59 | +## Generating credentials for Azure Maps |
| 60 | + |
| 61 | +{% ifversion ghes < 3.12 %} |
| 62 | + |
| 63 | +To configure authentication for Azure Maps using RBAC, your instance must run {% data variables.product.product_name %} {{ allVersions[currentVersion].currentRelease }}.{% ifversion ghes = 3.7 %}19{% elsif ghes = 3.8 %}12{% elsif ghes = 3.9 %}7{% elsif ghes = 3.10 %}4{% elsif ghes = 3.11 %}1{% endif %} or later. |
| 64 | + |
| 65 | +{% endif %} |
| 66 | + |
| 67 | +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). |
| 68 | + |
| 69 | +1. Register a new application on your Entra ID tenant. For more information, see [Quickstart: Register an application with the Microsoft identity platform](https://learn.microsoft.com/entra/identity-platform/quickstart-register-app#register-an-application) in the Entra documentation. |
| 70 | + |
| 71 | + - When you specify supported account types, select **Accounts in this organizational directory only**. |
| 72 | +1. Add a client secret. For more information, see [Quickstart: Register an application with the Microsoft identity platform](https://learn.microsoft.com/entra/identity-platform/quickstart-register-app#add-a-client-secret) in the Entra documentation. |
| 73 | +1. Store the value of the secret in a secure location that you can reference when you configure authentication on {% data variables.location.product_location %}. Entra will never display the value after you leave the page. |
| 74 | +1. Configure access to the secret by Azure Maps. |
| 75 | + |
| 76 | + 1. While viewing the details for the application you configured on your Entra ID tenant, in the left-hand sidebar, click **API permissions**. |
| 77 | + 1. Click **Add a permission**. |
| 78 | + 1. Click **Azure Maps**. |
| 79 | + 1. Select **Delegated permissions**. |
| 80 | + 1. Under "Select permissions", select "`user_impersonation`". |
| 81 | + 1. To save the permissions, click **Add permissions**. |
| 82 | +1. 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](https://www.microsoft.com/maps/azure/get-started) website. |
| 83 | +1. Configure RBAC for Azure Maps. For more information, see [Authentication with Azure Maps](https://learn.microsoft.com/azure/azure-maps/azure-maps-authentication#authorization-with-role-based-access-control) and [Assign Azure roles using the Azure portal](https://learn.microsoft.com/azure/role-based-access-control/role-assignments-portal) in the Azure documentation. |
| 84 | + |
| 85 | + - 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. |
| 86 | + |
| 87 | +{% endif %} |
| 88 | + |
| 89 | +## Enabling interactive maps |
| 90 | + |
| 91 | +{% ifversion azure-maps-auth-2023 %} |
| 92 | + |
| 93 | +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 {% data variables.location.product_location %}. |
| 94 | + |
| 95 | +{% endif %} |
| 96 | + |
| 97 | +{% data reusables.enterprise_site_admin_settings.access-settings %} |
| 98 | +{% data reusables.enterprise_site_admin_settings.management-console %} |
| 99 | +{% data reusables.enterprise_management_console.privacy %} |
| 100 | +1. To enable interactive maps, select "Enable GeoJSON rendering". |
| 101 | +1. 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 {% data variables.location.product_location %} to generate a string. For more information, see "[AUTOTITLE](/admin/administering-your-instance/administering-your-instance-from-the-command-line/accessing-the-administrative-shell-ssh)." |
| 102 | + |
| 103 | + ```shell copy |
| 104 | + openssl rand -hex 32 |
| 105 | + ``` |
| 106 | + |
| 107 | + Store the string in a secure location that you can reference in the next step. |
| 108 | +{%- ifversion azure-maps-auth-2023 %} |
| 109 | +1. {% ifversion ghes > 3.11 %}Below the headings, type or paste{% else %}Enter{% endif %} your authentication details for Azure Maps. |
| 110 | + |
| 111 | + {%- ifversion ghes < 3.11 %} |
| 112 | + - If your instance runs {% ifversion ghes < 3.11 %}a release of {% data variables.product.product_name %} in the {{ allVersions[currentVersion].currentRelease }} series earlier than {% else %}{% data variables.product.product_name %} {% endif %}{{ allVersions[currentVersion].currentRelease }}.{% ifversion ghes = 3.7 %}18{% elsif ghes = 3.8 %}11{% elsif ghes = 3.9 %}6{% elsif ghes = 3.10 %}3{% elsif ghes = 3.11 %}0{% endif %}, below "Azure Maps API Token", type or paste your token. |
| 113 | + |
| 114 | + {% data reusables.enterprise.azure-maps-auth-warning %} |
| 115 | + - If your instance runs {% data variables.product.product_name %} {{ allVersions[currentVersion].currentRelease }}.{% ifversion ghes = 3.7 %}19{% elsif ghes = 3.8 %}12{% elsif ghes = 3.9 %}7{% elsif ghes = 3.10 %}4{% elsif ghes = 3.11 %}1{% endif %} or later, below the headings, type or paste the following information. |
| 116 | + |
| 117 | + {%- endif %} |
| 118 | + - Optionally, to change the style of rendered maps, under "Basemap ID", type the ID for the style you'd like to use. |
| 119 | + - Under the headings, type or paste your authentication details. |
| 120 | + |
| 121 | + | Value | Description | More information | |
| 122 | + | :- | :- | :- | |
| 123 | + | Azure Map Client ID | Client ID for your Azure Maps account | [Manage authentication in Azure Maps](https://learn.microsoft.com/azure/azure-maps/how-to-manage-authentication#view-authentication-details) in the Azure documentation | |
| 124 | + | 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](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal#sign-in-to-the-application) in the Entra documentation | |
| 125 | + | Azure Tenant ID | ID for your tenant on Entra ID | "[Prerequisites](#prerequisites)" | |
| 126 | + | Azure App Client Secret | Client secret that you generated for the application on your Entra ID tenant | "[Generating credentials for Azure Maps](#generating-credentials-for-azure-maps)" |
| 127 | + | CSRF Secret | 32-character string to prevent CSRF attacks | See previous step. | |
| 128 | +{%- else %} |
| 129 | +1. To configure authentication, under "Azure Maps API Token", paste your token. |
| 130 | +{%- endif %} |
| 131 | +{% data reusables.enterprise_management_console.save-settings %} |
| 132 | + |
| 133 | +## Disabling interactive maps |
| 134 | + |
| 135 | +{% data reusables.enterprise_site_admin_settings.access-settings %} |
| 136 | +{% data reusables.enterprise_site_admin_settings.management-console %} |
| 137 | +{% data reusables.enterprise_management_console.privacy %} |
| 138 | +1. To disable interactive maps, deselect "Enable GeoJSON rendering". |
| 139 | +{% data reusables.enterprise_management_console.save-settings %} |
0 commit comments