Skip to content

Commit d7b5bae

Browse files
committed
Updated image links
1 parent 6a23904 commit d7b5bae

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

articles/azure-maps/how-to-secure-device-code.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: How to secure input constrained device with Azure AD and Azure Maps REST APIs
2+
title: How to secure an input constrained device using Azure AD and Azure Maps REST API
33
titleSuffix: Azure Maps
4-
description: How to configure a browser-less application which supports sign-in to Azure AD and calls Azure Maps REST APIs.
4+
description: How to configure a browser-less application which supports sign-in to Azure AD and calls Azure Maps REST API.
55
author: eriklindeman
66
ms.author: eriklind
77
ms.date: 06/12/2020
@@ -10,52 +10,48 @@ ms.service: azure-maps
1010
services: azure-maps
1111
---
1212

13-
# Secure an input constrained device with Azure AD and Azure Maps REST APIs
13+
# Secure an input constrained device using Azure active directory (Azure AD) and Azure Maps REST APIs
1414

15-
This guide discusses how to secure public applications or devices that cannot securely store secrets or accept browser input. These types of applications fall under the category of IoT or internet of things. Some examples of these applications may include: Smart TV devices or sensor data emitting applications.
15+
This guide discusses how to secure public applications or devices that cannot securely store secrets or accept browser input. These types of applications fall under the internet of things (IoT) category. Examples include Smart TVs and sensor data emitting applications.
1616

1717
[!INCLUDE [authentication details](./includes/view-authentication-details.md)]
1818

1919
## Create an application registration in Azure AD
2020

2121
> [!NOTE]
22-
> * **Prerequisite Reading:** [Scenario: Desktop app that calls web APIs](../active-directory/develop/scenario-desktop-overview.md)
22+
>
23+
> * **Prerequisite Reading:** [Scenario: Desktop app that calls web APIs]
2324
> * The following scenario uses the device code flow, which does not involve a web browser to acquire a token.
2425
2526
Create the device based application in Azure AD to enable Azure AD sign in. This application will be granted access to Azure Maps REST APIs.
2627

2728
1. In the Azure portal, in the list of Azure services, select **Azure Active Directory** > **App registrations** > **New registration**.
2829

29-
> [!div class="mx-imgBorder"]
30-
> ![App registration](./media/how-to-manage-authentication/app-registration.png)
30+
:::image type="content" source="./media/how-to-manage-authentication/app-registration.png" alt-text="A screenshot showing application registration in Azure AD":::
3131

32-
2. Enter a **Name**, choose **Accounts in this organizational directory only** as the **Supported account type**. In **Redirect URIs**, specify **Public client / native (mobile & desktop)** then add `https://login.microsoftonline.com/common/oauth2/nativeclient` to the value. For more details please see Azure AD [Desktop app that calls web APIs: App registration](../active-directory/develop/scenario-desktop-app-registration.md). Then **Register** the application.
32+
2. Enter a **Name**, choose **Accounts in this organizational directory only** as the **Supported account type**. In **Redirect URIs**, specify **Public client / native (mobile & desktop)** then add `https://login.microsoftonline.com/common/oauth2/nativeclient` to the value. For more details please see Azure AD [Desktop app that calls web APIs: App registration]. Then **Register** the application.
3333

34-
> [!div class="mx-imgBorder"]
35-
> ![Add app registration details for name and redirect uri](./media/azure-maps-authentication/devicecode-app-registration.png)
34+
:::image type="content" source="./media/how-to-manage-authentication/devicecode-app-registration.png" alt-text="A screenshot showing the register an application settings.":::
3635

3736
3. Navigate to **Authentication** and enable **Treat application as a public client**. This will enable device code authentication with Azure AD.
3837

39-
> [!div class="mx-imgBorder"]
40-
> ![Enable app registration as public client](./media/azure-maps-authentication/devicecode-public-client.png)
38+
:::image type="content" source="./media/azure-maps-authentication/devicecode-public-client.png" alt-text="A screen shot showing the advanced settings used to specify treating the application as a public client.":::
4139

4240
4. To assign delegated API permissions to Azure Maps, go to the application. Then select **API permissions** > **Add a permission**. Under **APIs my organization uses**, search for and select **Azure Maps**.
4341

44-
> [!div class="mx-imgBorder"]
45-
> ![Add app API permissions](./media/how-to-manage-authentication/app-permissions.png)
42+
:::image type="content" source="./media/how-to-manage-authentication/app-permissions.png" alt-text="A screen shot showing where you request API permissions.":::
4643

4744
5. Select the check box next to **Access Azure Maps**, and then select **Add permissions**.
4845

49-
> [!div class="mx-imgBorder"]
50-
> ![Select app API permissions](./media/how-to-manage-authentication/select-app-permissions.png)
46+
:::image type="content" source="./media/how-to-manage-authentication/select-app-permissions.png" alt-text="A screen shot showing where you specify the app permissions you require.":::
5147

52-
6. Configure Azure role-based access control (Azure RBAC) for users or groups. See [Grant role-based access for users to Azure Maps](#grant-role-based-access-for-users-to-azure-maps).
48+
6. Configure Azure role-based access control (Azure RBAC) for users or groups. See [Grant role-based access for users to Azure Maps].
5349

54-
7. Add code for acquiring token flow in the application, for implementation details see [Device code flow](../active-directory/develop/scenario-desktop-acquire-token-device-code-flow.md). When acquiring tokens, reference the scope: `user_impersonation` which was selected on earlier steps.
50+
7. Add code for acquiring token flow in the application, for implementation details see [Device code flow]. When acquiring tokens, reference the scope: `user_impersonation` which was selected on earlier steps.
5551

5652
> [!Tip]
5753
> Use Microsoft Authentication Library (MSAL) to acquire access tokens.
58-
> See recommendations on [Desktop app that calls web APIs: Code configuration](../active-directory/develop/scenario-desktop-app-configuration.md)
54+
> For more information, see [Desktop app that calls web APIs: Code configuration] in the active directory documentation.
5955
6056
8. Compose the HTTP request with the acquired token from Azure AD, and sent request with a valid HTTP client.
6157

@@ -70,7 +66,7 @@ x-ms-client-id: 30d7cc….9f55
7066
Authorization: Bearer eyJ0e….HNIVN
7167
```
7268

73-
The sample request body below is in GeoJSON:
69+
The following sample request body is in GeoJSON:
7470

7571
```json
7672
{
@@ -96,11 +92,18 @@ Operation-Location: https://us.atlas.microsoft.com/mapData/operations/{udid}?api
9692
Access-Control-Expose-Headers: Operation-Location
9793
```
9894

99-
10095
[!INCLUDE [grant role-based access to users](./includes/grant-rbac-users.md)]
10196

10297
## Next steps
10398

10499
Find the API usage metrics for your Azure Maps account:
100+
105101
> [!div class="nextstepaction"]
106-
> [View usage metrics](how-to-view-api-usage.md)
102+
> [View usage metrics]
103+
104+
[Scenario: Desktop app that calls web APIs]: ../active-directory/develop/scenario-desktop-overview.md
105+
[Desktop app that calls web APIs: App registration]: ../active-directory/develop/scenario-desktop-app-registration.md
106+
[Grant role-based access for users to Azure Maps]: #grant-role-based-access-for-users-to-azure-maps
107+
[Device code flow]: ../active-directory/develop/scenario-desktop-acquire-token-device-code-flow.md
108+
[Desktop app that calls web APIs: Code configuration]: ../active-directory/develop/scenario-desktop-app-configuration.md
109+
[View usage metrics]: how-to-view-api-usage.md

0 commit comments

Comments
 (0)